From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,ec2097fff44df8b9 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,ec2097fff44df8b9 X-Google-Attributes: gid1164f8,public X-Google-Thread: 1014db,ec2097fff44df8b9 X-Google-Attributes: gid1014db,public From: AJRobb@pavilion.co.uk (Andy J Robb) Subject: Re: getting correct local time in VAX C program Date: 1996/05/10 Message-ID: <4n08md$4s@s02.pavilion.co.uk>#1/1 X-Deja-AN: 154391098 references: <4jec36$ff3@lastactionhero.rs.itd.umich.edu> organization: Pavilion Internet plc newsgroups: comp.os.vms,comp.sys.dec,comp.lang.c raffel@umich.edu (David Raffel) wrote: >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. I have seen reference to DEC machines using localtime in response to TCP/ICMP timestamp packets without setting the high bit as required. >From this, I suspect that DEC expects the clock to be localtime. Thus, the Sun will respond to an rdate type request with UTC (aka GMT) and DEC will use it as localtime (I think, perhaps, possibly ...) Regards, Andy Robb. -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.2i mQCNAy/MpRwAAAEEAOt6uBYqT8yv9EmqNhK8m6v+bYi8QjnGW3Bo6iU1gsMj5pa6 MHgq99c8deADbE3cbJ6uZS9v5pZE3WCf6HCQjlB5iULA5RZzMdAumd/WUzuL9UT3 B44D9EqqFIL79FlYb56v4oKFqFp1/J2bIpYUwnUvabGzGjdLrpPl4P16x9sNAAUR tCNBbmR5IEogUm9iYiA8QUpSb2JiQHBhdmlsaW9uLmNvLnVrPrQhQW5keSBSb2Ji IDxBSlJvYmJAcGF2aWxpb24uY28udWs+ =/wVD -----END PGP PUBLIC KEY BLOCK-----