tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* mktime() question
@ 2002-07-23  9:17 Shiva Gowda
  0 siblings, 0 replies; only message in thread
From: Shiva Gowda @ 2002-07-23  9:17 UTC (permalink / 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>




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-07-23  9:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-23  9:17 mktime() question Shiva Gowda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox