This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug time/20265] strptime("....-00-1", "%Y-%W-%w") produces results that are off by a month (or 13 months for leap years)
- From: "jester13rok at yahoo dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 23 Aug 2017 21:59:11 +0000
- Subject: [Bug time/20265] strptime("....-00-1", "%Y-%W-%w") produces results that are off by a month (or 13 months for leap years)
- Auto-submitted: auto-generated
- References: <bug-20265-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20265
Jason Holland <jester13rok at yahoo dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jester13rok at yahoo dot com
--- Comment #1 from Jason Holland <jester13rok at yahoo dot com> ---
I can confirm it is a bug, I'm specifically creating tm struct and noticed that
the December 31 1904 converts to 364 and December 31 1905 converts to 365. For
the person implementing the fix please be aware certain centuries are not a
leap year,
from wikipedia:
In the Gregorian calendar every year that is divisible by 400 is due to be an
end-of-century leap year (often called a century leap year), with the
intercalation of February 29 yielding 366 days instead of 365. End-of-century
years that are not divisible by 400 are common years (with 365 days) and not
leap years
--
You are receiving this mail because:
You are on the CC list for the bug.