Why must time be kept from 1601?

| 3 Comments | No TrackBacks

I will start with a quote from the Scripting Guys on Microsoft's Technet.

"The other complicating factor, as we hinted at, is this: the lastLogonTimestamp is stored as a 64-bit integer. When you query the lastLogonTimestamp you don�t get back a date-time like May 15, 2005 8:05 AM. Instead, you get back the number of 100-nanosecond intervals that passed between January 1, 1601 and the time the user last logged on. (Come on: we�re not clever enough to make up something like that!) Consequently most of our code will be involved in taking that weird 64-bit integer value and converting it to a date and time."

I am just curious what the technical reason behind keeping time from 1601 for things such as this. Why not 1701 or 1901? Also why would you need to go that far back for something like last login time? Just seems odd to me.

No TrackBacks

TrackBack URL: http://www.hoyty.com/MovType/mt-tb.cgi/291

3 Comments

that's why you write a Perl script to convert and dump to SQL database. Of course they don't show you how to connect to all the DCs and compare the dates to find the latest....this code is pretty much useless without this, unless you only have one DC.

Well if you would RTFM you would see that problem has been fixed in Windows 2003. Some of us are allowed to upgrade. Nyah Nyah.

My favorite colour is yellow.

Leave a comment

About this Entry

This page contains a single entry by Brian Hoyt published on May 26, 2005 9:35 AM.

Good news, Bad news was the previous entry in this blog.

What video game character am I? is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.