This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/15284] New: mktime incorrectly normalize dates for year 2000


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]