/freebsd-10.0-release/contrib/ntp/ntpd/ |
H A D | check_y2k.c | 111 Days ( int Year ) /* return number of days since year "0" */ 127 static int year0 = 1900; /* sarting year for NTP time */ 128 static int yearend; /* ending year we test for NTP time. 130 **year in which NTP time overflows. 139 #define Error(year) if ( (year)>=2036 && LocalTime.tm_year < 110 ) \ 147 int year; local 156 year = ( sizeof( u_long ) > 4 ) /* save max span using year as temp */ 163 * fail ONLY beyond year 203 328 int year; member in struct:ParseTime [all...] |
/freebsd-10.0-release/usr.bin/calendar/ |
H A D | ostern.c | 36 /* return year day for Easter */ 46 easter(int year) /* 0 ... abcd, NOT since 1900 */ argument 55 G = year % 19; 56 C = year / 100; 59 J = (year + year / 4 + I + 2 - C + C / 4) % 7; 63 if (isleap(year))
|
H A D | paskha.c | 41 j2g(int year) argument 43 return (year < 1500) ? 45 10 + (year/100 - 16) - ((year/100 - 16) / 4); 48 /* return year day for Orthodox Easter using Gauss formula */ 52 paskha(int R) /*year*/
|
H A D | parsedata.c | 48 static char *floattoday(int year, double f); 50 static int wdayom (int day, int offset, int month, int year); 91 char *modifierindex, char *specialday, char *year, int *iyear) 101 *year = '\0'; 198 /* We have a year in the string. Now this is getting tricky */ 199 strcpy(year, p1); 200 *iyear = (int)strtol(year, NULL, 10); 342 char *year, int iyear) 355 if (year[0] != '\0') 356 printf("year 88 determinestyle(char *date, int *flags, char *month, int *imonth, char *dayofmonth, int *idayofmonth, char *dayofweek, int *idayofweek, char *modifieroffset, char *modifierindex, char *specialday, char *year, int *iyear) argument 339 debug_determinestyle(int dateonly, char *date, int flags, char *month, int imonth, char *dayofmonth, int idayofmonth, char *dayofweek, int idayofweek, char *modifieroffset, char *modifierindex, char *specialday, char *year, int iyear) argument 368 int year; member in struct:yearinfo 384 wdayom(int day, int offset, int month, int year) argument 439 int year, remindex; local 1041 floattoday(int year, double f) argument 1067 int year; local [all...] |
H A D | sunpos.c | 200 equinoxsolstice(int year, double UTCoffset, int *equinoxdays, int *solsticedays) argument 204 fequinoxsolstice(year, UTCoffset, fe, fs); 212 fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsticedays) argument 222 cumdays = cumdaytab[isleap(year)]; 231 sunpos(year, 3, d, UTCoffset, 0, 0, 0, 0.0, 0.0, &L, &decleft); 232 sunpos(year, 3, d + 1, UTCoffset, 0, 0, 0, 0.0, 0.0, 243 sunpos(year, 3, d, UTCoffset, 270 sunpos(year, 9, d, UTCoffset, 0, 0, 0, 0.0, 0.0, &L, &decleft); 271 sunpos(year, 9, d + 1, UTCoffset, 0, 0, 0, 0.0, 0.0, 282 sunpos(year, 367 calculatesunlongitude30(int year, int degreeGMToffset, int *ichinesemonths) argument [all...] |
H A D | calendar.h | 97 * (number of weeks per year), if you 124 int year; member in struct:event 191 void addtodate(struct event *e, int year, int month, int day); 195 void pom(int year, double UTCoffset, int *fms, int *nms); 196 void fpom(int year, double utcoffset, double *ffms, double *fnms); 199 void equinoxsolstice(int year, double UTCoffset, int *equinoxdays, int *solsticedays); 200 void fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsticedays); 201 int calculatesunlongitude30(int year, int degreeGMToffset, int *ichinesemonths);
|
/freebsd-10.0-release/contrib/ntp/libntp/ |
H A D | uglydate.c | 23 int year; local 34 year = 0; 40 year = tm->tm_year; 41 while (year >= 100) 42 year -= 100; 45 timep, year, tm->tm_yday, tm->tm_hour, tm->tm_min,
|
H A D | caltontp.c | 23 prior_years = jt->year-1; 24 ace_days = jt->yearday /* days this year */
|
H A D | caljulian.c | 45 u_long d4; /* Days into a 4-year cycle */ 48 u_long n4; /* # of 4-year cycles */ 49 u_long n1; /* # of years into a leap year */ 75 * Calculate the year and year-of-day 78 jt->year = (u_short)(400*n400 + 100*n100 + n4*4 + n1); 83 * If the cycle year ever comes out to 4, it must be December 31st 84 * of a leap year. 98 jt->year++; 106 if (jt->month == 1 && is_leapyear(jt->year)) [all...] |
/freebsd-10.0-release/sys/kern/ |
H A D | subr_clock.c | 103 * ( ((year % 4) == 0 && 104 * (year % 100) != 0) || 105 * ((year % 400) == 0) ) 109 leapyear(int year) argument 113 if ((year & 3) == 0) { 115 if ((year % 100) == 0) { 117 if ((year % 400) == 0) 128 ct->year, ct->mon, ct->day, 136 int i, year, days; local 138 year 182 int i, year, days; local [all...] |
/freebsd-10.0-release/contrib/tzcode/stdtime/ |
H A D | asctime.c | 42 ** The ISO C 1999 and POSIX 1003.1-2004 standards prohibit padding the year, 51 ** For years that are more than four digits we put extra spaces before the year 53 ** a digit within a year and truncating the year (operating on the assumption 95 char year[INT_STRLEN_MAXIMUM(int) + 2]; local 109 ** Use strftime's %Y to generate the year, to avoid overflow problems 114 (void) strftime(year, sizeof year, "%Y", timeptr); 119 ((strlen(year) <= 4) ? ASCTIME_FMT : ASCTIME_FMT_B), 123 year); local [all...] |
/freebsd-10.0-release/tools/tools/netrate/tcpp/ |
H A D | runit.pl | 13 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); 15 $year += 1900; 16 $date = sprintf("%04d%02d%02d", $year, $mon, $mday);
|
/freebsd-10.0-release/usr.bin/chpass/ |
H A D | util.c | 88 int day, month, year; local 118 year = atoi(t); 122 if (year < 69) 123 year += 2000; 124 else if (year < 100) 125 year += 1900; 126 if (year < 1969) 128 lt->tm_year = year - 1900;
|
/freebsd-10.0-release/usr.bin/at/ |
H A D | parsetime.c | 99 { "year", YEARS,0 }, /* year ... */ 424 * assign_date() assigns a date, wrapping to next year if needed 427 assign_date(struct tm *tm, long mday, long mon, long year) argument 431 * Convert year into tm_year format (year - 1900). 432 * We may be given the year in 2 digit, 4 digit, or tm_year format. 434 if (year != -1) { 435 if (year >= 1900) 436 year 478 long year= (-1); local [all...] |
/freebsd-10.0-release/contrib/ntp/include/ |
H A D | ntp_datum.h | 20 unsigned short year; member in struct:vmedate
|
/freebsd-10.0-release/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); 61 $year = $_[5]; 65 $year += $YearFix if $year < $epoch[5]; 66 while ($diff = $year - $g[5]) {
|
/freebsd-10.0-release/sys/dev/mc146818/ |
H A D | mc146818.c | 109 int timeout, cent, year; local 140 year = FROMREG((*sc->sc_mcread)(dev, MC_YEAR)); 141 year += sc->sc_year0; 144 year += cent * 100; 145 } else if (year < POSIX_BASE_YEAR) 146 year += 100; 149 ct.year = year; 195 int cent, year; local 220 year [all...] |
/freebsd-10.0-release/crypto/heimdal/doc/ |
H A D | mdate-sh | 41 # Find the month. Next argument is day, followed by the year or time. 65 # the time of day or the year. 67 *:*) set `date`; eval year=\$$# 82 # For the first six month of the year the time notation can also 83 # be used for files modified in the last year. 86 year=`expr $year - 1` 88 *) year=$3;; 92 echo $day $month $year
|
/freebsd-10.0-release/contrib/file/ |
H A D | cdf_time.c | 49 * Return the number of days between jan 01 1601 and jan 01 of year. 52 cdf_getdays(int year) argument 57 for (y = CDF_BASE_YEAR; y < year; y++) 67 cdf_getday(int year, int days) argument 72 int sub = mdays[m] + (m == 1 && isleap(year)); 84 cdf_getmonth(int year, int days) argument 90 if (m == 1 && isleap(year))
|
/freebsd-10.0-release/sys/dev/mk48txx/ |
H A D | mk48txx.c | 162 int year; local 192 year = FROMBCD(FROMREG(MK48TXX_IYEAR, MK48TXX_YEAR_MASK)); 193 year += sc->sc_year0; 195 year += (FROMREG(MK48TXX_IWDAY, MK48TXX_WDAY_CB) >> 197 else if (year < POSIX_BASE_YEAR) 198 year += 100; 202 ct.year = year; 224 int cent, year; local 254 year [all...] |
/freebsd-10.0-release/contrib/ldns/ |
H A D | util.c | 173 is_leap_year(int year) argument 175 return LDNS_MOD(year, 4) == 0 && (LDNS_MOD(year, 100) != 0 176 || LDNS_MOD(year, 400) == 0); 195 int year = 1900 + tm->tm_year; local 196 time_t days = 365 * ((time_t) year - 1970) + leap_days(1970, year); 205 if (tm->tm_mon > 1 && is_leap_year(year)) { 228 int year = 1970; local 231 while (days < 0 || days >= (int64_t) (is_leap_year(year) [all...] |
/freebsd-10.0-release/contrib/ntp/parseutil/ |
H A D | dcfd.c | 208 long year; member in struct:clocktime 465 clock_time->year = ext_bf(buffer, DCF_Y10); 466 clock_time->year = TIMES10(clock_time->year) + ext_bf(buffer, DCF_Y1); 770 if ( clock_time->year < YEAR_PIVOT ) /* in case of Y2KFixes [ */ 771 clock_time->year += 100; /* *year%100, make tm_year */ 773 if ( clock_time->year < YEAR_BREAK ) /* (failsafe if) */ 774 clock_time->year += 1900; /* Y2KFixes ] */ 777 * must have been a really bad year cod 1245 int year; /* current working year */ local [all...] |
/freebsd-10.0-release/contrib/ntp/util/ |
H A D | tg.c | 31 * string yydddhhmmss, where yy is the year of century, ddd the day of 32 * year, hh the hour of day and mm the minute of hour. For instance, 133 {COEF, 1}, /* 4 1 year units */ 180 {COEF, 1}, /* 51 10 year tens */ 263 int minute, hour, day, year; local 270 year = 0; 311 sscanf(optarg, "%2d%3d%2d%2d", &year, &day, 357 year = tm->tm_year % 100; 375 printf("year %d day %d time %02d:%02d:%02d tone %d\n", 376 year, da [all...] |
/freebsd-10.0-release/sys/dev/iicbus/ |
H A D | pcf8563.c | 54 uint16_t sc_year0; /* TOD clock year 0 */ 139 ct.year = FROMBCD(val[PCF8563_R_YEAR] & PCF8563_M_YEAR); 140 ct.year += sc->sc_year0; 141 if (ct.year < POSIX_BASE_YEAR) 142 ct.year += 100; /* assume [1970, 2069] */ 144 if (ct.year >= 100 + sc->sc_year0) 146 } else if (ct.year < 100 + sc->sc_year0) 175 val[PCF8563_R_YEAR] = TOBCD(ct.year % 100); 177 if (ct.year >= 100 + sc->sc_year0) 179 } else if (ct.year < 10 [all...] |
/freebsd-10.0-release/sys/sys/ |
H A D | clock.h | 66 int year; /* year (4 digit year) */ member in struct:clocktime 90 /* Traditional POSIX base year */
|