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/15808] New: localtime operator error


http://sourceware.org/bugzilla/show_bug.cgi?id=15808

            Bug ID: 15808
           Summary: localtime operator error
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: 380374483 at qq dot com
                CC: drepper.fsp at gmail dot com

Created attachment 7129
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7129&action=edit
code and result picture

please see the attachment

time_t t1 = 589546905 + 100 * 3600;
time_t t2 = 589546905 + 99 * 3600;

tm tm1,tm2;

localtime_r(&t1,&tm1);
localtime_r(&t2,&tm2);

the result is the same

result:
time_t = 589906905 
year = 1988 
mon = 9 
mday = 10 
wday = 6 
hour = 23 
min = 1 
sec = 45 
time_t = 589903305 
year = 1988 
mon = 9 
mday = 10 
wday = 6 
hour = 23 
min = 1 
sec = 45

-- 
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]