[Bug 204529] struct tm documentation in time.h possibly incorrect
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Nov 13 19:32:20 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204529
Bug ID: 204529
Summary: struct tm documentation in time.h possibly incorrect
Product: Base System
Version: 11.0-CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: freebsd-bugs at FreeBSD.org
Reporter: michael.cress at cress.us
In time.h:
struct tm {
int tm_sec; /* seconds after the minute [0-60] */
int tm_min; /* minutes after the hour [0-59] */
int tm_hour; /* hours since midnight [0-23] */
int tm_mday; /* day of the month [1-31] */
int tm_mon; /* months since January [0-11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday [0-6] */
int tm_yday; /* days since January 1 [0-365] */
int tm_isdst; /* Daylight Savings Time flag */
long tm_gmtoff; /* offset from UTC in seconds */
char *tm_zone; /* timezone abbreviation */
};
Is the documentation for tm_sec and tm_yday accurate? The range [0-60] for
tm_sec yeilds 61 values and [0-365] yields 366 values. Since other values are
in sensible ranges (e.g. tm_min -> [0-59]), I'm thinking this is an error. "man
3 gmtime" shows this same struct as well but makes no mention of these ranges
being special cases.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list