From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,ec2097fff44df8b9,start X-Google-Attributes: gidf7344,public X-Google-Thread: 1014db,ec2097fff44df8b9,start X-Google-Attributes: gid1014db,public X-Google-Thread: 1164f8,ec2097fff44df8b9,start X-Google-Attributes: gid1164f8,public From: raffel@umich.edu (David Raffel) Subject: getting correct local time in VAX C program Date: 1996/03/28 Message-ID: <4jec36$ff3@lastactionhero.rs.itd.umich.edu>#1/1 X-Deja-AN: 144681127 content-type: Text/Plain; charset=US-ASCII organization: UM mime-version: 1.0 newsgroups: comp.os.vms,comp.sys.dec,comp.lang.c 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