Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


ZEN Date Conversion

Keywords: 	 ZEN Date Conversion

Question:

I was wondering if anyone new how to translate the 'LastRun' dword value of a NAL object to a readable date?

Example:

HKLM\Software\Netware\NAL\1.0\Distribute\TREE\APPGUID\[LastRun] = 1006869352
I would like to convert 1006869352 to a readable date format.

Here are some of the Dword Values and what they should equal. (You may find that the time might be 7:2x:etc instead of 2:2x:etc. I found a utility from Novell's website that does this calculatation, but it reports a time that is five hours ahead)

1010172162 = 1/4/2002 at 2:22:42 PM
1010172252 = 1/4/2002 at 2:24:12 PM
1010172363 = 1/4/2002 at 2:26:03 PM
1010172500 = 1/4/2002 at 2:28:20 PM

Answer:

Date and time stamp values in NDS are stored as an unsigned integer that represents the # of seconds since midnight on 1/1/1970. The time is stored as UTC, so you might need to apply your own local TZ offset to it in order to have it appear as a local date/time value.

The following line shows how to do the conversion:

TimeAdd("1970:01:01:00:00:00","0000:00:00:00:00:1010172162")
The result is "2002:01:04:19:22:42".
Article ID:   W15308