From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,d6e837e84c06cc86 X-Google-Attributes: gid1164f8,public From: schubot@wmich.edu Subject: Re: DEC Timestamp conversion Date: 1997/09/15 Message-ID: <1997Sep15.182711@winnie>#1/1 X-Deja-AN: 272773099 References: <34194B1C.43FD3983@voicenet.com> Organization: Western Michigan University Newsgroups: comp.sys.dec In article <34194B1C.43FD3983@voicenet.com>, Robert Strecker writes: > Hi, > > I have a customer that has transferred an image of a file using > Reflection 2.0 to a PC running Windows. The file contains a timestamp > (64 bits, 100 nanosecond units since Nov17, 1858). Does anyone know of > existing software that will convert the timestamp to Windows format (32 > bits, seconds since Jan 1, 1970)? > > Thanks in advance. > > -Bob > To convert subtract 35067168000000000 from the timestamp value to adjust the base to 1-jan-1970, then divide by 10,000,000 to convert the 100ns resolution to seconds. The tricky part is doing this as 64 bit numnbers and determining what order to interpret the bytes. For reference, some HEX values of VMS times are: 1-Jan-1970 00:00:00.00- 007C9567 4BEB4000 = 35,067,168,000,000,000 1-JAN-1970 00:00:01.00- 007C9567 4C83D680 1-SEP-1997 00:00:00.00- 009B99F2 74270000 Ronald.Schubot @wmich.edu Western Michigan University