mktime()
Corinna Vinschen
vinschen@redhat.com
Wed Aug 24 13:39:00 GMT 2011
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
More information about the Newlib
mailing list