From: SMTP%"DCantor@chqsplay.mv.com" 28-JAN-1995 11:08:22.26 To: EVERHART CC: Subj: Re: VMS quadword time to UNIX time From: DCantor@chqsplay.mv.com (David A. Cantor) X-Newsgroups: comp.os.vms Subject: Re: VMS quadword time to UNIX time Message-ID: <791269989.42snx@chqsplay.mv.com> Date: Sat, 28 Jan 95 05:13:09 GMT Organization: My Own Disorganization Lines: 18 To: Info-VAX@Mvb.Saic.Com X-Gateway-Source-Info: USENET In article <3gbc8f$820@crl.crl.com> fgodino@crl.com writes: > >Looking for a routine or algorithim to convert the VMS quadword time > to UNIX time (a long word value).. > >Promblem is VMS has a zero base date of NOV 18. 1858 and Unix is Jan 1 1970 VMS maintains a count of 100nsec units which have elapsed since 18-Nov-1858 00:00:00.0000000 in the quadword. (If you divide this number by 864,000,000,000 (the number of 100nsec units in one day), you get the so-called Modified Julian Date (MJD).) Unix maintains a count of full seconds elapsed since 1-Jan-1970 00:00:00 . (Both ignore the leap seconds which have occured, of course, so we can ignore them here, too.) To convert from VMS time to Unix time, divide the 64-bit VMS integer value by 10,000,000 and subtract the product of 40587 (that's the MJD for 1-Jan-1970) and 86400 (the number of seconds in one day) from the integer portion of the quotient.