public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/15284] New: mktime incorrectly normalize dates for year 2000
@ 2013-03-16 13:12 uleysky at gmail dot com
2013-03-16 17:15 ` [Bug libc/15284] " schwab@linux-m68k.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: uleysky at gmail dot com @ 2013-03-16 13:12 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15284
Bug #: 15284
Summary: mktime incorrectly normalize dates for year 2000
Product: glibc
Version: 2.17
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: unassigned@sourceware.org
ReportedBy: uleysky@gmail.com
CC: drepper.fsp@gmail.com
Classification: Unclassified
Created attachment 6937
--> http://sourceware.org/bugzilla/attachment.cgi?id=6937
Test program. Calculate date from year and day-of-year.
I need to calculate date from year and day-of-year, so I use feature of mktime
to normalize dates. Simple test programm attached. It works fine except for a
year 2000.
Output for year 2000:
./test 2000 59
2000-02-28
./test 2000 60
2000-03-01
./test 2000 366
2001-01-01
For year 2004 mktime works fine:
./test 2004 59
2004-02-28
./test 2004 60
2004-02-29
./test 2004 366
2004-12-31
I think, this is a bug.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/15284] mktime incorrectly normalize dates for year 2000
2013-03-16 13:12 [Bug libc/15284] New: mktime incorrectly normalize dates for year 2000 uleysky at gmail dot com
@ 2013-03-16 17:15 ` schwab@linux-m68k.org
2013-03-17 0:11 ` uleysky at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: schwab@linux-m68k.org @ 2013-03-16 17:15 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15284
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> 2013-03-16 17:15:14 UTC ---
The year 3900 isn't a leap year.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/15284] mktime incorrectly normalize dates for year 2000
2013-03-16 13:12 [Bug libc/15284] New: mktime incorrectly normalize dates for year 2000 uleysky at gmail dot com
2013-03-16 17:15 ` [Bug libc/15284] " schwab@linux-m68k.org
@ 2013-03-17 0:11 ` uleysky at gmail dot com
2013-03-17 0:16 ` schwab@linux-m68k.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: uleysky at gmail dot com @ 2013-03-17 0:11 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15284
Michael Uleysky <uleysky at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
--- Comment #2 from Michael Uleysky <uleysky at gmail dot com> 2013-03-17 00:11:11 UTC ---
(In reply to comment #1)
> The year 3900 isn't a leap year.
Where you see year 3900? I say about year 2000, which is leap year.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/15284] mktime incorrectly normalize dates for year 2000
2013-03-16 13:12 [Bug libc/15284] New: mktime incorrectly normalize dates for year 2000 uleysky at gmail dot com
2013-03-16 17:15 ` [Bug libc/15284] " schwab@linux-m68k.org
2013-03-17 0:11 ` uleysky at gmail dot com
@ 2013-03-17 0:16 ` schwab@linux-m68k.org
2013-03-17 2:05 ` uleysky at gmail dot com
2014-06-13 18:42 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: schwab@linux-m68k.org @ 2013-03-17 0:16 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15284
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |INVALID
--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> 2013-03-17 00:15:48 UTC ---
int tm_year; // years since 1900
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/15284] mktime incorrectly normalize dates for year 2000
2013-03-16 13:12 [Bug libc/15284] New: mktime incorrectly normalize dates for year 2000 uleysky at gmail dot com
` (2 preceding siblings ...)
2013-03-17 0:16 ` schwab@linux-m68k.org
@ 2013-03-17 2:05 ` uleysky at gmail dot com
2014-06-13 18:42 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: uleysky at gmail dot com @ 2013-03-17 2:05 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15284
--- Comment #4 from Michael Uleysky <uleysky at gmail dot com> 2013-03-17 02:04:51 UTC ---
(In reply to comment #3)
> int tm_year; // years since 1900
Oh, I am sorry...
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/15284] mktime incorrectly normalize dates for year 2000
2013-03-16 13:12 [Bug libc/15284] New: mktime incorrectly normalize dates for year 2000 uleysky at gmail dot com
` (3 preceding siblings ...)
2013-03-17 2:05 ` uleysky at gmail dot com
@ 2014-06-13 18:42 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 18:42 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15284
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-13 18:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-16 13:12 [Bug libc/15284] New: mktime incorrectly normalize dates for year 2000 uleysky at gmail dot com
2013-03-16 17:15 ` [Bug libc/15284] " schwab@linux-m68k.org
2013-03-17 0:11 ` uleysky at gmail dot com
2013-03-17 0:16 ` schwab@linux-m68k.org
2013-03-17 2:05 ` uleysky at gmail dot com
2014-06-13 18:42 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).