Jump to content

Time


Recommended Posts

In WMI I have this entry in a Date time field:

20100805110904.000000+***

What is this format called? I'm trying to look in the help guide to see if there's functions available for working with this type.

In my script I want to capture the current time from my system then wait for WMI entry to show that time or greater.

So in the case above I kicked off the script at:

2010-08-05 11:05:56.000

And then I do a while loop look for the WMI entry to be changed so I know things took effect.

Just wanted to know if there was a simple function to help with that already.

Thanks,

Terry

Link to comment
Share on other sites

Did you look in the Timer Management section and the date management section of the helpfile? You could get the time then compare the strings.

Like i said in the post I want to look in the help guide but I'm not really sure what format the time "20100805110904.000000+***" is in. So will any of the Autoit functions even work with what I want to do comparing against it?

In help I see, DOS times, System times, file times, Encode times, ... but I'm not sure what format the time above would be in?

I can convert my system time to look like above but not sure what the ".000000+***" part is or does...

Anyway I'm probably making this harder than I have to I just thought I'd ask to see if anyone had worked with similarly formatted times before.

Not sure how the Timer section of the help guide would help me? I'm not timing how long it takes, I just want to be able to query WMI and see if the lastrefresh time is greater than when I kicked off my script or not.

Terry

Link to comment
Share on other sites

The .000000 part should be parts of a second. Some timestamps are simply a 64-bit count of 150ns ticks since a certain epoch. The "+***" is probably for the timezone offset (i.e -600 minutes for GMT - 10 hours in Honolulu).

But that format is not universal in WMI, so exactly what WMI context did it come from? The context might help answer your question.

:blink:

Corrected TZ offset example to be in minutes.

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

The .000000 part should be parts of a second. Some timestamps are simply a 64-bit count of 150ns ticks since a certain epoch. The "+***" is probably for the timezone offset (i.e -10 for GMT - 10 hours in Honolulu).

But that format is not universal in WMI, so exactly what WMI context did it come from? The context might help answer your question.

:blink:

Not sure how it helps but it is part of a WMI class from SCCM around when activities have occurred.

They all seem to end exactly in ".000000+***" so it must not really be used, just showing in WMI. So I may just get that entry, trim this part off, convert my system time to be the same and then compare...

Thanks,

Terry

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...