This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
mktime and time zone offsets
- From: Savin Zlobec <savin dot zlobec at email dot si>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 7 Oct 2003 19:01:05 +0200
- Subject: [ECOS] 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