This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

Re: mktime()


On Aug 22 14:31, Steven Abner wrote:
> Hi gang;
>   Came across a discrepancy in the handling between localtime and mktime. In the file mktm_r.c, the function _mktm_r has:
>       res->tm_yday = 365 + isleap(res->tm_year);
> I believe it should be:
>       res->tm_yday = 364 + isleap(res->tm_year);
> A test using localtime to create the broken-down time, then perform the inverse, mktime, showed that localtime created tm_yday of 365 then mktime corrected it to 364.

I think you're right.  Can you please send the simple testcase?


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


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