Home
last modified time | relevance | path

Searched refs:days (Results 1 – 25 of 273) sorted by relevance

1234567891011

/freebsd/contrib/unbound/compat/
H A Dgmtime_r.c50 long days; local
56 days = *timep / SECSPERDAY;
61 --days;
65 ++days;
75 tmp->tm_wday = (int) ((EPOCH_WDAY + days) % DAYSPERWEEK);
80 while (days < 0 || days >= (long) year_lengths[yleap = isleap(y)]) {
83 newy = y + days / DAYSPERNYEAR;
84 if (days < 0)
86 days -= (newy - y) * DAYSPERNYEAR +
92 tmp->tm_yday = (int) days;
[all …]
/freebsd/contrib/ntp/libntp/
H A Dntp_calgps.c68 ++datum->days; in _norm_ntp_datum()
72 --datum->days; in _norm_ntp_datum()
159 uint32_t base, days, sign; in _gpsntp_fix_gps_era() local
165 days = out.days; in _gpsntp_fix_gps_era()
167 sign = (uint32_t)-(days < base); in _gpsntp_fix_gps_era()
168 days = sign ^ (days - base); in _gpsntp_fix_gps_era()
169 days %= clen; in _gpsntp_fix_gps_era()
170 days = base + (sign & clen) + (sign ^ days); in _gpsntp_fix_gps_era()
172 out.days = days; in _gpsntp_fix_gps_era()
203 retv.days = pivot->days; in _gpsntp_from_daytime()
[all …]
H A Dntp_calendar.c367 * and full days before a date: 1970-01-01 would be (1969, 0, 0) in
376 * (day number). This is the number of days elapsed since 0000-12-31
669 * Split a 64bit seconds value into elapsed days in 'res.hi' and
827 * Split a 32bit seconds value into h/m/s and excessive days. This
864 * Given the number of elapsed days in the calendar era, split this
866 * of elapsed days of that year in 'res.lo'.
874 int32_t days, in ntpcal_split_eradays()
890 * We want to execute '(days * 4 + 3) /% 146097' under floor in ntpcal_split_eradays()
892 * calculate 'floor((days + 0.75) / 36524.25)', but we want to in ntpcal_split_eradays()
899 ud64 = ((uint64_t)days << in ntpcal_split_eradays()
875 ntpcal_split_eradays(int32_t days,int * isleapyear) ntpcal_split_eradays() argument
1069 int32_t days; ntpcal_daysec_to_date() local
1092 int32_t days; ntpcal_daysec_to_tm() local
1230 ntpcal_dayjoin(int32_t days,int32_t secs) ntpcal_dayjoin() argument
1588 int32_t days, secs; ntpcal_date_to_time() local
1965 int32_t weeks, days, secs; isocal_date_to_ntp64() local
[all...]
/freebsd/contrib/file/src/
H A Dcdf_time.c54 int days = 0; in cdf_getdays() local
58 days += isleap(y) + 365; in cdf_getdays()
60 return days; in cdf_getdays()
67 cdf_getday(int year, int days) in cdf_getday() argument
73 if (days < sub) in cdf_getday()
74 return days; in cdf_getday()
75 days -= sub; in cdf_getday()
77 return days; in cdf_getday()
84 cdf_getmonth(int year, int days) in cdf_getmonth() argument
89 days -= mdays[m]; in cdf_getmonth()
[all …]
/freebsd/sys/kern/
H A Dsubr_clock.c88 #define day_of_week(days) (((days) + 4) % 7) argument
137 int i, year, days; in clock_ct_to_ts() local
172 days = recent_base_days; in clock_ct_to_ts()
175 days = 0; in clock_ct_to_ts()
178 days += days_in_year(i); in clock_ct_to_ts()
182 days += days_in_month(year, i); in clock_ct_to_ts()
183 days += (ct->day - 1); in clock_ct_to_ts()
185 ts->tv_sec = (((time_t)days * 24 + ct->hour) * 60 + ct->min) * 60 + in clock_ct_to_ts()
246 time_t i, year, days; in clock_ts_to_ct() local
251 days = secs / SECDAY; in clock_ts_to_ct()
[all …]
/freebsd/contrib/llvm-project/libcxx/include/__chrono/
H A Dday.h53 _LIBCPP_HIDE_FROM_ABI constexpr day& operator+=(const days& __dd) noexcept;
54 _LIBCPP_HIDE_FROM_ABI constexpr day& operator-=(const days& __dd) noexcept;
67 _LIBCPP_HIDE_FROM_ABI inline constexpr day operator+(const day& __lhs, const days& __rhs) noexcept {
71 _LIBCPP_HIDE_FROM_ABI inline constexpr day operator+(const days& __lhs, const day& __rhs) noexcept {
75 _LIBCPP_HIDE_FROM_ABI inline constexpr day operator-(const day& __lhs, const days& __rhs) noexcept {
79 _LIBCPP_HIDE_FROM_ABI inline constexpr days operator-(const day& __lhs, const day& __rhs) noexcept {
80 return days(static_cast<int>(static_cast<unsigned>(__lhs)) - static_cast<int>(static_cast<unsigned>(__rhs)));
83 _LIBCPP_HIDE_FROM_ABI inline constexpr day& day::operator+=(const days& __dd) noexcept {
88 _LIBCPP_HIDE_FROM_ABI inline constexpr day& day::operator-=(const days& __dd) noexcept {
H A Dweekday.h64 _LIBCPP_HIDE_FROM_ABI constexpr weekday& operator+=(const days& __dd) noexcept;
65 _LIBCPP_HIDE_FROM_ABI constexpr weekday& operator-=(const days& __dd) noexcept;
101 _LIBCPP_HIDE_FROM_ABI inline constexpr weekday operator+(const weekday& __lhs, const days& __rhs) n…
107 _LIBCPP_HIDE_FROM_ABI inline constexpr weekday operator+(const days& __lhs, const weekday& __rhs) n…
111 _LIBCPP_HIDE_FROM_ABI inline constexpr weekday operator-(const weekday& __lhs, const days& __rhs) n…
115 _LIBCPP_HIDE_FROM_ABI inline constexpr days operator-(const weekday& __lhs, const weekday& __rhs) n…
118 return days{__wdu - __wk * 7};
121 _LIBCPP_HIDE_FROM_ABI inline constexpr weekday& weekday::operator+=(const days& __dd) noexcept {
126 _LIBCPP_HIDE_FROM_ABI inline constexpr weekday& weekday::operator-=(const days& __dd) noexcept {
/freebsd/usr.bin/pom/
H A Dpom.c77 double days, today, tomorrow; in main() local
136 days = (GMT.tm_yday + 1) + ((GMT.tm_hour + in main()
139 days += isleap(1900 + cnt) ? 366 : 365; in main()
140 today = potm(days); in main()
151 tomorrow = potm(days + 1); in main()
175 potm(double days) in potm() argument
180 N = 360 * days / 365.2422; /* sec 42 #3 */ in potm()
187 l = 13.1763966 * days + lzero; /* sec 61 #4 */ in potm()
189 Mm = l - (0.1114041 * days) - Pzero; /* sec 61 #5 */ in potm()
191 Nm = Nzero - (0.0529539 * days); /* sec 61 #6 */ in potm()
/freebsd/crypto/heimdal/lib/asn1/
H A Dtimegm.c99 time_t days = t / (3600 * 24); in _der_gmtime() local
113 if (days > (ASN1_MAX_YEAR * 365)) in _der_gmtime()
119 if (days < dayinyear) in _der_gmtime()
122 days -= dayinyear; in _der_gmtime()
128 if (days < daysinmonth) in _der_gmtime()
130 days -= daysinmonth; in _der_gmtime()
133 tm->tm_mday = days + 1; in _der_gmtime()
/freebsd/crypto/openssl/test/certs/
H A Dmkcert.sh115 cert "$cert" "$exts" -signkey "${key}.pem" -set_serial 1 -days "${DAYS}"
157 -set_serial 2 -days "${DAYS}" "$@"
178 -set_serial 2 -days "${DAYS}"
200 -set_serial 2 -days "${DAYS}"
217 -set_serial 2 -days "${DAYS}"
267 -set_serial 2 -days "${DAYS}" "$@"
301 -set_serial 2 -days "${DAYS}" "$@"
330 -set_serial 2 -days "${DAYS}" "$@"
347 -set_serial 1 -days "${DAYS}" "$@"
356 cert "$cert" "" -signkey "${key}.pem" -set_serial 1 -days -1 "$@"
[all …]
/freebsd/crypto/openssl/test/smime-certs/
H A Dmksmime-certs.sh18 -keyout smroot.pem -out smroot.pem -newkey rsa:2048 -days 36501
24 $OPENSSL x509 -req -in req.pem -CA smroot.pem -days 36500 \
29 $OPENSSL x509 -req -in req.pem -CA smroot.pem -days 36500 \
34 $OPENSSL x509 -req -in req.pem -CA smroot.pem -days 36500 \
43 $OPENSSL x509 -req -in req.pem -CA smroot.pem -days 36500 \
47 $OPENSSL x509 -req -in req.pem -CA smroot.pem -days 36500 \
51 $OPENSSL x509 -req -in req.pem -CA smroot.pem -days 36500 \
61 $OPENSSL x509 -req -in req.pem -CA smroot.pem -days 36500 \
65 $OPENSSL x509 -req -in req.pem -CA smroot.pem -days 36500 \
81 $OPENSSL x509 -req -in req.pem -CA smroot.pem -days 36500 \
/freebsd/contrib/ldns/
H A Dduration.c65 duration->days = 0; in ldns_duration_create()
96 if (d1->days != d2->days) { in ldns_duration_compare()
97 return (int) (d1->days - d2->days); in ldns_duration_compare()
152 duration->days = (time_t) atoi(str+1); in ldns_duration_create_from_string()
224 || dur_scan_print(&p, eob, 'D', d->days)) in ldns_duration2string()
254 period += (duration->days)*86400; in ldns_duration2time()
H A Dutil.c197 time_t days = 365 * ((time_t) year - 1970) + leap_days(1970, year); in ldns_mktime_from_utc() local
204 days += mdays[i]; in ldns_mktime_from_utc()
207 ++days; in ldns_mktime_from_utc()
209 days += tm->tm_mday - 1; in ldns_mktime_from_utc()
211 hours = days * 24 + tm->tm_hour; in ldns_mktime_from_utc()
227 ldns_year_and_yday_from_days_since_epoch(int64_t days, struct tm *result) in ldns_year_and_yday_from_days_since_epoch() argument
232 while (days < 0 || days >= (int64_t) (is_leap_year(year) ? 366 : 365)) { in ldns_year_and_yday_from_days_since_epoch()
233 new_year = year + (int) LDNS_DIV(days, 365); in ldns_year_and_yday_from_days_since_epoch()
234 days -= (new_year - year) * 365; in ldns_year_and_yday_from_days_since_epoch()
235 days -= leap_days(year, new_year); in ldns_year_and_yday_from_days_since_epoch()
[all …]
/freebsd/usr.bin/w/
H A Dpr_time.c105 int days = idle / 86400; in pr_idle() local
106 xo_emit(" {:idle/%dday%s} ", days, days > 1 ? "s" : " " ); in pr_idle()
107 if (days >= 100) in pr_idle()
109 if (days >= 10) in pr_idle()
/freebsd/crypto/openssl/demos/certs/apps/
H A Dmkxcerts.sh8 -keyout tsha1.pem -out tsha1.pem -new -days 3650 -sha1
11 -keyout tsha256.pem -out tsha256.pem -new -days 3650 -sha256
14 -keyout tsha512.pem -out tsha512.pem -new -days 3650 -sha512
24 -days 3650 -sha256
29 -days 3650 -sha384
H A Dmkacerts.sh9 -keyout root.pem -out root.pem -key rootkey.pem -new -days 3650
14 $OPENSSL x509 -req -in intreq.pem -CA root.pem -CAkey rootkey.pem -days 3630 \
20 $OPENSSL x509 -req -in creq.pem -CA intca.pem -CAkey intkey.pem -days 3600 \
27 $OPENSSL x509 -req -in sreq.pem -CA intca.pem -CAkey intkey.pem -days 3600 \
34 $OPENSSL x509 -req -in sreq2.pem -CA intca.pem -CAkey intkey.pem -days 3600 \
/freebsd/crypto/openssl/demos/certs/
H A Dmkcerts.sh9 -keyout root.pem -out root.pem -newkey rsa:2048 -days 3650
14 $OPENSSL x509 -req -in intreq.pem -CA root.pem -days 3600 \
21 $OPENSSL x509 -req -in req.pem -CA intca.pem -CAkey intkey.pem -days 3600 \
28 $OPENSSL x509 -req -in creq.pem -CA intca.pem -CAkey intkey.pem -days 3600 \
35 $OPENSSL x509 -req -in rreq.pem -CA intca.pem -CAkey intkey.pem -days 3600 \
42 $OPENSSL x509 -req -in respreq.pem -CA intca.pem -CAkey intkey.pem -days 3600 \
60 $OPENSSL x509 -req -in dhsreq.pem -CA root.pem -days 3600 \
70 $OPENSSL x509 -req -in dhcreq.pem -CA root.pem -days 3600 \
/freebsd/lib/libc/nameser/
H A Dns_ttl.c52 int secs, mins, hours, days, weeks, x; in ns_format_ttl() local
58 days = src % 7; src /= 7; in ns_format_ttl()
66 if (days) { in ns_format_ttl()
67 T(fmt1(days, 'D', &dst, &dstlen)); in ns_format_ttl()
78 if (secs || !(weeks || days || hours || mins)) { in ns_format_ttl()
/freebsd/usr.bin/calendar/
H A Ddates.c53 struct cal_day *days; member
149 pd = pm->days; in createdate()
166 pm->days = pd; in createdate()
248 d = m->days; in dumpdates()
282 d = m->days; in remember_ymd()
314 d = m->days; in remember_yd()
382 d = m->days; in walkthrough_dates()
393 d = m->days; in walkthrough_dates()
400 d = m->days; in walkthrough_dates()
430 d = m->days; in find_day()
/freebsd/usr.bin/procstat/
H A Dprocstat_rusage.c67 int days, hours, minutes, seconds, used; in format_time() local
73 days = hours / 24; in format_time()
76 if (days == 1) in format_time()
78 else if (days > 0) in format_time()
79 used += snprintf(buffer, sizeof(buffer), "%u days ", days); in format_time()
/freebsd/contrib/unbound/sldns/
H A Dparseutil.c75 time_t days = 365 * ((time_t) year - 1970) + leap_days(1970, year); in sldns_mktime_from_utc() local
82 days += mdays[i]; in sldns_mktime_from_utc()
85 ++days; in sldns_mktime_from_utc()
87 days += tm->tm_mday - 1; in sldns_mktime_from_utc()
89 hours = days * 24 + tm->tm_hour; in sldns_mktime_from_utc()
99 sldns_year_and_yday_from_days_since_epoch(int64_t days, struct tm *result) in sldns_year_and_yday_from_days_since_epoch() argument
104 while (days < 0 || days >= (int64_t) (is_leap_year(year) ? 366 : 365)) { in sldns_year_and_yday_from_days_since_epoch()
105 new_year = year + (int) LDNS_DIV(days, 365); in sldns_year_and_yday_from_days_since_epoch()
106 days -= (new_year - year) * 365; in sldns_year_and_yday_from_days_since_epoch()
107 days -= leap_days(year, new_year); in sldns_year_and_yday_from_days_since_epoch()
[all …]
/freebsd/share/examples/uefisign/
H A Duefikeys23 days="3650"
33 openssl req -new -x509 -sha256 -days "${days}" -subj "${subj}" -key "${keyfile}" -out "${certfile}"…
/freebsd/contrib/ntp/ntpd/
H A Dcheck_y2k.c168 unsigned long days; in main() local
218 days = 365+1; /* days in year 0 + 1 more day */ in main()
223 if ( days != Test ) in main()
226 year, (long)days, (long)Test ); in main()
231 if ( days != Test ) in main()
234 year, (long)days, (long)Test ); in main()
238 days += 365; in main()
239 if ( isleap_4(year) ) days++; in main()
/freebsd/sys/dev/ips/
H A Dips_commands.c409 long days, rem, y; in ips_ffdc_settime() local
417 days = sctime / IPS_SECSPERDAY; in ips_ffdc_settime()
427 while (days < 0 || days >= (long) year_lengths[yleap = ips_isleap(y)]) { in ips_ffdc_settime()
430 newy = y + days / IPS_DAYSPERNYEAR; in ips_ffdc_settime()
431 if (days < 0) in ips_ffdc_settime()
433 days -= (newy - y) * IPS_DAYSPERNYEAR + in ips_ffdc_settime()
441 for(month = 0; days >= (long) ip[month]; ++month) in ips_ffdc_settime()
442 days = days - (long) ip[month]; in ips_ffdc_settime()
444 command->day = days + 1; in ips_ffdc_settime()
/freebsd/bin/date/
H A Dvary.c296 int days; in adjhour() local
298 days = (t->tm_hour + val) / 24; in adjhour()
302 if (!adjday(t, '+', days, 0)) in adjhour()
309 int days; in adjhour() local
311 days = val / 24; in adjhour()
314 days++; in adjhour()
318 if (!adjday(t, '-', days, 0)) in adjhour()

1234567891011