Summary: | ctime(3): struct tm documentation possibly incorrect | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Documentation | Reporter: | Michael Cress <michael.cress> | ||||||||
Component: | Manual Pages | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||||||
Status: | Open --- | ||||||||||
Severity: | Affects Only Me | CC: | doc, felix.the.red, michael.cress, ziaee | ||||||||
Priority: | --- | ||||||||||
Version: | Latest | ||||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Attachments: |
|
Description
Michael Cress
2015-11-13 19:37:02 UTC
Looking at time.h on Linux, I see struct tm { int tm_sec; /* Seconds. [0-60] (1 leap second) */ . . . int tm_yday; /* Days in year.[0-365] */ . . } So, it seems the 0-60 range is due to a leap second. I am assuming that the 0-365 range is due to leap year range also. Can notation regarding this be added to the gmtime man page to clarify this issue? Created attachment 228609 [details]
ctime(3) patch
Document that tm_sec has a range of [0,60] to allow for leap seconds,
and tm_yday has a range of [0,365] to allow for leap years.
This is a documentation issue, not an implementation issue. *** Bug 204529 has been marked as a duplicate of this bug. *** Patch is for a contrib/tzcode/stdtime/ctime.3 Created attachment 258141 [details]
ctime(3) patch
^Triage: rebase patch.
Created attachment 258142 [details]
ctime(3) patch
^Triage: rebase patch.
|