/freebsd/contrib/ntp/libntp/ |
H A D | clocktime.c | 2 * clocktime - compute the NTP date from a day of year, hour, minute 21 * change when we are already less than a half year from the receive 22 * time stamp. Since the length of a year is variable we use a 35 * Take a time spec given as day-of-year, hour, minute and second as 37 * '*ts_ui'. The value will be in the range (rec_ui-0.5yrs) to 38 * (rec_ui+0.5yrs). A hint for the current start-of-year will be 42 * '*yearstart' will receive the associated start-of-year. 45 * (+/-4hrs) around the receive time by returning a non-zero value. 49 * 32-bit arithmetic. 53 int yday , /* day-of-year */ in clocktime() [all …]
|
H A D | ntp_calendar.c | 2 * ntp_calendar.c - calendar and helper functions 7 * --------- 301 unsigned short hour, minute, second, day, year; ntpcal_get_build_date() local 1505 ntpcal_year_to_ystart(int32_t year) ntpcal_year_to_ystart() argument [all...] |
H A D | ymd2yd.c | 2 * ymd2yd - compute the date in the year from y/m/d 19 * elapsed days since the start of the given year and convert in ymd2yd() 20 * back to unity-based day in year. in ymd2yd() 25 return ntpcal_edate_to_yeardays(y-1, m-1, d-1) + 1; in ymd2yd()
|
/freebsd/contrib/ntp/include/ |
H A D | ntp_calendar.h | 2 * ntp_calendar.h - definitions for the calendar time-of-day routine 13 uint16_t year; /* year (A.D.) */ member 14 uint16_t yearday; /* day of year, 1 = January 1 */ 27 uint16_t year; /* year (A.D.) */ member 28 uint8_t week; /* 1..53, week in year */ 54 * days-of-week 83 * We deal in a 4 year cycle starting at March 1, 1900. We assume 91 #define DAYSPERYEAR (365) /* days per year */ 96 #define SECSPERYEAR (365 * SECSPERDAY) /* regular year */ 97 #define SECSPERLEAPYEAR (366 * SECSPERDAY) /* leap year */ [all …]
|
/freebsd/contrib/tzdata/ |
H A D | leapseconds.awk | 1 # Generate zic format 'leapseconds' from NIST/IERS format 'leap-seconds.list'. 7 # timestamps this program works only to the year 2216, which is the 8 # year 1900 plus 10**10 seconds. However, in practice 9 # POSIX-conforming awk implementations invariably use IEEE-754 double 10 # and so support exact integers through 2**53. By the year 2216, 12 # timestamps this program should be good until the year 285,428,681 13 # (the year 1900 plus 2**53 seconds). By then leap seconds will be 23 print "# This file is generated automatically from the data in the public-domain" 24 print "# NIST/IERS format leap-seconds.list file, which can be copied from" 25 print "# <https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list>" [all …]
|
/freebsd/usr.sbin/fifolog/lib/ |
H A D | getdate.y | 13 ** Poul-Henning Kamp <phk@FreeBSD.org> 50 ** Daylight-savings mode: on, off, or not yet known. 57 ** Meridian: am, pm, or 24-hour style. 163 yyTimezone = - ($4 % 100 + ($4 / 100) * 60); 177 yyTimezone = - ($6 % 100 + ($6 / 100) * 60); 226 /* ISO 8601 format. yyyy-mm-dd. */ 228 yyMonth = -$2; 229 yyDay = -$3; 232 /* e.g. 17-JUN-1992. */ 235 yyYear = -$3; [all …]
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_parse_date.c | 4 * This is a plain C recursive-descent translation of an old 5 * public-domain YACC grammar that has been used for parsing dates in 6 * very many open-source projects. 46 /* Daylight-savings mode: on, off, or not yet known. */ 77 time_t Year; member 84 * seconds, month/year are counted in months. */ 102 if (gds->tokenp[0].token == tUNUMBER in timephrase() 103 && gds->tokenp[1].token == ':' in timephrase() 104 && gds->tokenp[2].token == tUNUMBER in timephrase() 105 && gds->tokenp[3].token == ':' in timephrase() [all …]
|
/freebsd/usr.bin/find/ |
H A D | getdate.y | 74 ** Daylight-savings mode: on, off, or not yet known. 81 ** Meridian: am, pm, or 24-hour style. 169 yyTimezone = - ($4 % 100 + ($4 / 100) * 60); 183 yyTimezone = - ($6 % 100 + ($6 / 100) * 60); 232 /* ISO 8601 format. yyyy-mm-dd. */ 234 yyMonth = -$2; 235 yyDay = -$3; 238 /* e.g. 17-JUN-1992. */ 241 yyYear = -$3; 264 yyRelSeconds = -yyRelSeconds; [all …]
|
/freebsd/crypto/krb5/src/tests/ |
H A D | t_y2038.py | 4 # has elapsed, and may start exhibiting problems around the year 2075. 7 skip_rest('y2038 timestamp tests', 'platform has 32-bit time_t') 9 # Start a KDC running roughly 21 years in the future, after the y2038 14 realm.start_kdc(['-T', '662256000']) 31 realm.kinit(realm.user_princ, password('user'), flags=['-T', realm.ccache]) 37 realm.run([kadminl, 'modprinc', '-pwexpire', '662256600 seconds', 'user']) 41 year = int(out.split()[-1]) variable 42 if year < 2038 or year > 9999: 43 fail('password expiration year') 52 # affect the display time by a little bit, so just look for the year. [all …]
|
/freebsd/crypto/krb5/src/kadmin/cli/ |
H A D | getdate.y | 29 /* The following block of alloca-related preprocessor directives is here 30 solely to allow compilation by non GNU-C compilers of the C parser 115 #define EPOCH_END 2106 /* assumes unsigned 32-bit range */ 131 ** Daylight-savings mode: on, off, or not yet known. 138 ** Meridian: am, pm, or 24-hour style. 237 yyTimezone = - ($4 % 100 + ($4 / 100) * 60); 251 yyTimezone = - ($6 % 100 + ($6 / 100) * 60); 294 /* ISO 8601 format. yyyy-mm-dd. */ 296 yyMonth = -$2; 297 yyDay = -$3; [all …]
|
/freebsd/contrib/ntp/scripts/monitoring/ |
H A D | timelocal.pl | 4 ;# $time = timelocal($sec,$min,$hours,$mday,$mon,$year,$junk,$junk,$isdst); 5 ;# $time = timegm($sec,$min,$hours,$mday,$mon,$year); 8 ;# with localtime() and gmtime(). We manage this by caching the start times 9 ;# of any months we've seen before. If we know the start time of the month, 10 ;# we can always calculate any time within the month. The start times 30 $tzmin = 24 * 60 - $tzmin; # minutes west of GMT 31 $tzmin -= 24 * 60 if $epoch[5] == 70; # account for the date line 46 $cheat + $_[0] * $SEC + $_[1] * $MIN + $_[2] * $HR + ($_[3]-1) * $DAYS; 54 $cheat + $_[0] * $SEC + $_[1] * $MIN + $_[2] * $HR + ($_[3]-1) * $DAYS 55 + $tzmin * $MIN - 60 * 60 * ($_[8] != 0); [all …]
|
/freebsd/lib/libcalendar/ |
H A D | calendar.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 37 * For each month tabulate the number of days elapsed in a year before the 38 * month. This assumes the internal date representation, where a year 40 * But we do need a special table for the year 1582, since 10 days are 60 static int firstweek(int year); 64 * March 1st of year zero. 73 * Compute the year by starting with an approximation not smaller in jdate() 75 * year which does not begin after ndays. in jdate() 81 idt.y--; in jdate() [all …]
|
H A D | calendar.3 | 44 .Fn easterg "int year" "struct date *dt" 46 .Fn easterog "int year" "struct date *dt" 48 .Fn easteroj "int year" "struct date *dt" 58 .Fn week "int nd" "int *year" 63 starting at March 1st, year zero (i.e., 1 B.C.) and ending way beyond 64 year 100000. 99 provide conversions between the common "year, month, day" notation 102 The days are numbered from March 1st year 1 B.C., starting 104 year 1 B.C. 138 The two calendars differ by the definition of the leap year. [all …]
|
/freebsd/contrib/lyaml/spec/ |
H A D | ext_yaml_parser_spec.yaml | 2 # Copyright (C) 2013-2022 Gary V. Vaughan 5 - it parses empty streams: 11 - it ignores comments: ' 12 e = yaml.parser "# A comment\nnon-comment # trailing comment\n" 15 expect (e ().value).to_be "non-comment" 18 - describe STREAM_START: 19 - before: 21 - it is the first event: 23 - it reports event start marker: 25 - it reports event end marker: [all …]
|
/freebsd/sys/kern/ |
H A D | subr_clock.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 60 error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); in sysctl_machdep_adjkerntz() 61 if (!error && req->newptr) in sysctl_machdep_adjkerntz() 77 /*--------------------------------------------------------------------* 86 (month_days[(m) - 1] + (m == FEBRUARY ? leapyear(y) : 0)) 96 * some recent year avoids lots of unnecessary loop iterations in conversion. 97 * recent_base_days is the number of days before the start of recent_base_year. 103 * Table to 'calculate' pow(10, 9 - nsdigits) via lookup of nsdigits. 113 * ( ((year % 4) == 0 && [all …]
|
H A D | subr_fattime.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2006 Poul-Henning Kamp 28 * Convert MS-DOS FAT format timestamps to and from unix timespecs 33 * yyyyyyymmmmddddd (year - 1980, month, day) 54 * The conversion functions below cut time into four-yea 79 #define YEAR global() macro [all...] |
/freebsd/usr.bin/calendar/ |
H A D | calendar.1 | 45 .Bk -words 48 .Op . Ar mm Op . Ar year 52 .Op Fl U Ar UTC-offset 64 .Bl -tag -width Ds 87 This option requires super-user privileges. 112 .Op . Ar mm Op . Ar year 116 .It Fl U Ar UTC-offset 137 .Bl -tag -width 123456789012345 -compact 155 The first day of the Chinese year. 178 .Dq Paskha-4 . [all …]
|
/freebsd/usr.bin/last/ |
H A D | last.1 | 36 .Op Fl -libxo 64 hostname, the start and stop times for the session, and the duration 72 .Bl -tag -width indent-two 73 .It Fl -libxo 103 .Bl -tag -width Ds -compact -offset indent 105 The first two digits of the year (the century). 107 The second two digits of the year. 121 Month of the year, from 1 to 12. 137 year. 160 .Dq Li "last -t 03" [all …]
|
/freebsd/contrib/tzcode/ |
H A D | zic.8 | 2 .\" 2009-05-17 by Arthur David Olson. 11 .Op Fl -help 12 .Op Fl -version 27 .Op Fl t Ar localtime-link 39 .Dq "-" , 43 .Bl -tag -width indent 44 .It Fl -version 46 .It Fl -hel [all...] |
/freebsd/contrib/ntp/clockstuff/ |
H A D | chutest.c | 2 * chutest - test the CHU clock 84 * main - parse arguments and handle options 133 (void) fprintf(stderr, "usage: %s [-dft] tty_device\n", in main() 137 (void) fprintf(stderr, "usage: %s [-dft] tty_device\n", in main() 142 (void) fprintf(stderr, "usage: %s [-cdft] tty_device\n", in main() 168 * openterm - open a port to the CHU clock 236 * process_raw - process characters in raw mode 253 difftv.tv_sec = tv.tv_sec - lasttv.tv_sec; in process_raw() 254 difftv.tv_usec = tv.tv_usec - lasttv.tv_usec; in process_raw() 256 difftv.tv_sec--; in process_raw() [all …]
|
/freebsd/contrib/ntp/ntpd/ |
H A D | refclock_tsyncpci.c | 65 #define PRECISION (-20) /* precision assumed (1 us) */ 66 #define DESCRIPTION "Spectracom TSYNC-PCI" /* WRU */ 104 #define TSYNC_TIME_BASE_YEAR (1970) // earliest acceptable year 142 unsigned char syncOption; /* -M option */ 148 unsigned short year; member 188 unsigned int year; member 271 tsync_start, /* start up driver */ 313 * IN: unit - not used. 314 * *peer - pointer to this reference clock's peer structure 315 * Returns: 0 - unsuccessfu [all...] |
H A D | refclock_hopfser.c | 4 * - clock driver for hopf serial boards (GPS or DCF77) 53 #define PRECISION (-10) /* precision assumed (about 1 ms) */ 101 hopfserial_start, /* start up driver */ 111 * hopfserial_start - open the devices and initialize data for processing 129 fd = refclock_open(&peer->srcadr, gpsdev, SPEED232, LDISC_CLK); in hopfserial_start() 132 printf("hopfSerialClock(%d) start: open %s failed\n", unit, gpsdev); in hopfserial_start() 144 pp = peer->procptr; in hopfserial_start() 145 pp->unitptr = up; in hopfserial_start() 146 pp->io.clock_recv = hopfserial_receive; in hopfserial_start() 147 pp->i in hopfserial_start() [all...] |
/freebsd/contrib/ntp/parseutil/ |
H A D | dcfd.c | 2 …* /src/NTP/REPOSITORY/ntp4-dev/parseutil/dcfd.c,v 4.18 2005/10/07 22:08:18 kardel RELEASE_20051008… 14 * Leap second handling (at that level you should switch to NTP Version 4 - really!) 16 * Copyright (c) 1995-2015 by Frank Kardel <kardel <AT> ntp.org> 17 …* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Ge… 90 if ((_a_)->tv_usec >= 1000000) \ 92 (_a_)->tv_sec += (_a_)->tv_usec / 1000000; \ 93 (_a_)->tv_usec = (_a_)->tv_usec % 1000000; \ 95 if ((_a_)->tv_usec < 0) \ 97 (_a_)->tv_sec -= 1 + (-(_a_)->tv_usec / 1000000); \ 98 (_a_)->tv_usec = 999999 - (-(_a_)->tv_usec - 1); \ [all …]
|
/freebsd/contrib/ntp/libparse/ |
H A D | clk_rcc8000.c | 2 * /src/NTP/ntp4-dev/libparse/clk_rcc8000.c,v 4.9 2004/11/14 15:29:41 kardel RELEASE_20050508_A 6 * Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support 45 * DDD - Day of year number 46 * W - Day of week number (Sunday is 0) 52 { { { 13, 2 }, {16, 2}, { 19, 2}, /* Day, Month, Year */ 84 if (!Strok(buffer, format->fixed_string)) return CVT_NONE; in cvt_rcc8000() 85 #define OFFS(x) format->field_offsets[(x)].offset in cvt_rcc8000() 86 #define STOI(x, y) Stoi(&buffer[OFFS(x)], y, format->field_offsets[(x)].length) in cvt_rcc8000() 87 if ( STOI(O_DAY, &clock_time->da in cvt_rcc8000() [all...] |
/freebsd/contrib/ntp/scripts/stats/ |
H A D | README.timecodes | 11 C on-time character (start bit) 12 Y year of century 14 D day of year or month/day 40 ddd = day of year 60 yy = year (as broadcast) 61 ddd = day of year 63 l = leap-second warning (L indicates leap at end of month) 75 TrueTime 468-DC Satellite Synchronized Clock (and other TrueTime 93 Heath GC-1000 Most Accurate Clock (WWV/H) 102 yy = year of century (from DIPswitches) [all …]
|