A year contains (more-or-less, but more accurately than what you've specified) 
365.25 days (a leap-year happens each four years, but not ALWAYS every four 
years).

300 * 365.25 = 109,575

109,575 * (24 * 60 * 60 * 10,000,000) = 94,672,800,000,000,000

C:\> W32tm /ntte 94672800000000000
109575 00:00:00.0000000 - 1/3/1901 7:00:00 PM

Using PowerShell to perform these types of date calculations is a LOT easier 
than attempting to do it manually, as well as less prone to error (it knows all 
of the proper adjustments to make).

Regards,

Michael B. Smith
Consultant and Exchange MVP
http://TheEssentialExchange.com

From: Bonner, John [mailto:johnbon...@centura.org]
Sent: Thursday, December 22, 2011 6:13 PM
To: NT System Admin Issues
Subject: w32tm.exe Help Understanding--Update

OK I figured out the first one. It is not the number of naonoseconds. It is 100 
nanosecond intervals. So that makes sense as for the 100 days when it should be 
one day.
Still working on the second one.


Hello and Merry Christmas,

I am feeling pretty dumb here and would like to wrap up one of my projects 
before the holiday.

Currently I am trying to do some calculations using w32tm.exe to validate my 
math...and my math appears to be wrong.
For example I Google how many nanoseconds in a day. From multiple sources I get 
86,400,000,000,000. Fine then w32tm.exe should match saying 1 day....but it 
doesn't  It says 100 days????

C:\Users\jbonner>w32tm.exe /ntte 86400000000000
100 00:00:00.0000000 - 4/10/1601 5:00:00 PM

A day is a day regardless so I can't see that time zone would matter for this 
simple calculation??

So let's say Google is wrong and I use 864,000,000,000 which does show as one 
day.

C:\Users\jbonner>w32tm.exe /ntte 864000000000
1 00:00:00.0000000 - 4/10/1601 5:00:00 PM

Fine w32tm.exe has an epoch of 1-1-1601. I want the number of nanoseconds till 
1-1-1901. That would be

300 (1901-1601)
365 (days in a year)
300 * 365 = 109,500 days

109500 days * 864000000000 (nanoseconds in a day) = 94,608,000,000,000,000

Close but no dice.

C:\Users\jbonner>w32tm.exe /ntte 94608000000000000
109500 00:00:00.0000000 - 10/20/1900 5:00:00 PM

So I am pretty confused and any clarification would be greatly appreciated.
JB


*****************************************************************************
This communication is for the use of the intended recipient only. It may
contain information that is privileged and confidential. If you are not the
intended recipient of this communication, any disclosure, copying, further
distribution or use thereof is prohibited. If you have received this
communication in error, please advise me by return e-mail or by telephone and
delete/destroy it.
*****************************************************************************

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Reply via email to