This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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]

mktime and time zone offsets


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


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