Forum Discussion
nassim
14 years agoOccasional Contributor
Hi Helen,
Thank you very much for your help. Once, the VM windows time showsed 10:48 and I ran your solution like this:
Set dtUTC = GetObject("winmgmts:\\.\root\cimv2:Win32_UTCTime=@")
dt = aqDateTime. SetDateTimeElements(dtUTC. Year, dtUTC.Month, dtUTC.Day, dtUTC.Hour, dtUTC.Minute, dtUTC.Second)
curTimeStr = aqConvert.DateTimeToStr(dt)
Log.Message("current time is " & curTimeStr)
unixTime = DateDiff("s", "01/01/1970 00:00:00", dt)
Log.Message("unix time is " & unixTime)
in Log I see:
current time is 04.10.2011 08:48:37
unix time is 1317718117
As I checked the unix time 1317718117 , it relates to the date
Tue Oct 04 10:48:37 2011
I am confused. It would be very kind if you or another member can help.
Thank you in advance
Nassim
Thank you very much for your help. Once, the VM windows time showsed 10:48 and I ran your solution like this:
Set dtUTC = GetObject("winmgmts:\\.\root\cimv2:Win32_UTCTime=@")
dt = aqDateTime.
curTimeStr = aqConvert.DateTimeToStr(dt)
Log.Message("current time is " & curTimeStr)
unixTime = DateDiff("s", "01/01/1970 00:00:00", dt)
Log.Message("unix time is " & unixTime)
in Log I see:
current time is 04.10.2011 08:48:37
unix time is 1317718117
As I checked the unix time 1317718117 , it relates to the date
Tue Oct 04 10:48:37 2011
I am confused. It would be very kind if you or another member can help.
Thank you in advance
Nassim
Related Content
- 9 years ago
- 5 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago