Daylight Savings Time, Leap Years, ctime, and date
Guy Harris
guy at auspex.auspex.com
Tue Apr 18 17:40:41 AEST 1989
> > 2) Does anyone know if the new versions are less naive about determining
> > leap years? It seems the current routines only use the "year % 4 ==0"
> > rule.
>
>Fixed by POSIX as I recall. (POSIX == IEEE 1003.1 standard in this case).
Nope. POSIX just refers to ANSI C for the descriptions of "localtime"
and "mktime", and the (d)(p)ANS doesn't say anything about how those
routines should decide what a leap year is. It's a
quality-of-implementation issue.
More information about the Comp.unix.questions
mailing list