[ECOS] mktime and time zone offsets

Savin Zlobec savin.zlobec@email.si
Tue Oct 7 17:01:00 GMT 2003


Hello,

if I understand correctly how date and time is handled under eCos,
than it is entirely up to the application to specify STD and DST zone
offsets and switch to/from DST with cyg_libc_time_setdst.

Is this correct?    

If it is, than what is wrong with simple time adjustment made
according to tm_isdst flag in mktime - the code is commented out.  

The following test will fail with the current implementation
of mktime if zone offsets are set.

time0 = time(NULL);
lt = localtime(&time0);
time1 = mktime(lt);

if (time0 != time1) FAIL();


savin

____________________
http://www.email.si/

--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list