W32tm.exe doesn't use nanoseconds, it uses 0.1 microseconds.

w32tm /ntte <NT time epoch>
  Convert a NT system time, in (10^-7)s intervals from 0h 1-Jan 1601,
  into a readable format.

Regards,

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

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

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