From: Shiva Gowda <sgowda@orga.com>
Subject: mktime() question
Date: Tue, 23 Jul 2002 11:17:43 +0200 [thread overview]
Message-ID: <3D3D1F37.2000908@orga.com> (raw)
Hi Gurus,
Recently we migrated one of our application from 4.0F to 5.1A.
From then onwards we have some problems with the application.
That is because of mktime() library function. The values returned
by this function is not the same. Is there any change in the
functionality of mktime()?
The timezones are different on both the systems. One is in DST &
the other in CEST. Both are UTC+02. Does it affect the mktime() function?
thx,
//Shiva
Here is an example:
sgowda@od-dec-unix-7<113> cat time.c
#include <stdio.h>
#include <time.h>
main() {
struct tm t;
sscanf("19990716112330", "%04d%02d%02d%02d%02d%02d",
&(t.tm_year), &(t.tm_mon), &(t.tm_mday), &(t.tm_hour), &(t.tm_min), &(t.tm_sec));
t.tm_year -= 1900;
t.tm_mon--;
printf("time in time_t: %d\n", mktime(&t));
}
sgowda@od-dec-unix-7<107> sizer -v
Digital UNIX V4.0F (Rev. 1229); Sun Jan 13 16:29:23 MET 2002
sgowda@od-dec-unix-7<108> ./time
time in time_t: 932120610 #<<<<<< Note the value
sgowda@od-dec-unix-7<109>
sgowda@ds10l-51A<83> sizer -v
Compaq Tru64 UNIX V5.1A (Rev. 1885); Tue Feb 5 13:03:20 CET 2002
sgowda@ds10l-51A<84> ~/time
time in time_t: 932117010 #<<<<< Its different from above output.
sgowda@ds10l-51A<85>
reply other threads:[~2002-07-23 9:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox