Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Unix Timestamp to DateTimeContent of Unix Timestamp to DateTime.vbsMD5 Hash: ADD8A1997B5EFE3CC49E1E05E84BBCF3 |
||
wscript.echo TimeStampToDateTime(342954300, false)
wscript.echo TimeStampToDateTime(342954300, true) ' ------------------------------- Private Function TimeStampToDateTime(iTimeStamp, bWithTimeZone) Select Case bWithTimeZone Case True TimeStampToDateTime = DateAdd("s", iTimeStamp + CurrentTimeZone(), CDate("01.01.1970")) Case False TimeStampToDateTime = DateAdd("s", iTimeStamp, CDate("01.01.1970")) End Select End Function ' -------------------------------- Private Function CurrentTimeZone() Dim OS On Error Resume Next For Each OS in GetObject("winmgmts:").InstancesOf ("Win32_OperatingSystem") CurrentTimeZone = OS.CurrentTimeZone * 60 Next End Function | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |