Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* getting correct local time in VAX C program
@ 1996-03-28  5:00 David Raffel
  1996-03-31  5:00 ` Carl J Lydick
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: David Raffel @ 1996-03-28  5:00 UTC (permalink / raw)



I'm having a problem using the c localtime function to convert a
"timestamp" (represented in seconds since 1/1/1970) to a date
and time.  I'm running under VMS V5.5-2 and using VAXC V3.1.

The problem is that the timestamp is being written out to a file
by a SUN which takes into account timezone information.  When I
read the timestamp on VMS and convert it, I get the correct date,
but the time is off by 5 hours.  I assume that this is because
the VAX doesn't use any timezone information and always returns
GMT.

When I call time() to get the current time in seconds, the
time returned on VMS is different by 18000 seconds from the
time returned on the SUN.

Are there any routines available that will return the correct
local time, or any suggestions for how I can get the correct
time?

Thanks!

David Raffel
raffel@umich.edu





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-05-10  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-03-28  5:00 getting correct local time in VAX C program David Raffel
1996-03-31  5:00 ` Carl J Lydick
1996-04-02  5:00 ` Stephen Hoffman
1996-05-10  4:00 ` Andy J Robb

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