This is the mail archive of the libc-hacker@sourceware.cygnus.com 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]

Re: A revised time patch (fwd)


> 
> hjl@lucon.org (H.J. Lu) writes:
> 
> > Here is the testcase. My previous patch to time/mktime.c is incomplete.
> > Please use this one. BTW, __mktime_internal mishandles the cases
> > where tm_isdst is different from __daylight != 0. Basically when 
> > tm_isdst == 0/__daylight != 0 and tm_isdst == 1/__daylight == 0, we 
> > should check
> 
> I've checked in a patch for this now.  The test case HJ sent (thanks!) 
> work now and I hopefully have't broken anything else.
> 

Unfortunately, it is still broken. I am enclosing the expected output
from my testcase.

> I haven't used HJ's patch since the mktime file must work standalone
> in other packages and therefore must not depend on any implementation
> details of the other timezone functions.
> 

What do you mean by that? Are we talking glibc here? If you really
want, you can #ifdef/#endif with __GLIBC__ >= 2. At least, we get
a working glibc. My patch is the cleanest one I can find for glibc.
I don't really care other packages.

Thanks.


H.J.
------
min: 59
hour: 1
isdst: 1
593917199
Thu Oct 27 01:59:59 1988
min: 0
hour: 1
isdst: 0
593917221
Thu Oct 27 01:00:21 1988
min: 0
hour: 3
isdst: 1
574999221
Tue Mar 22 03:00:21 1988
min: 59
hour: 1
isdst: 1
593913599
Thu Oct 27 01:59:59 1988
min: 0
hour: 4
isdst: 1
574999221
Tue Mar 22 04:00:21 1988
min: 0
hour: 0
isdst: 0
593913621
Thu Oct 27 00:00:21 1988


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