Search the Community
Showing results for tags 'timezone'.
-
The script shows the offset from GMT-UTC in standard format through string manipulation. #include <Date.au3> ConsoleWrite (_TimeZoneInfo() & @CRLF) Func _TimeZoneInfo() $aInfo = _Date_Time_GetTimeZoneInformation() ConsoleWrite("bias: " & $aInfo[1] & @CRLF) $hours = $aInfo[1] / 60 If $hours = "0" Then $hours = "+00:00" Else If StringInStr($hours, "-") Then $hours = StringReplace($hours, "-", "+") Else $hours = "-" & $hours EndIf If Not StringInStr($hours, ".") Then $hours = $hours & ":00" $hours = StringReplace($hours, ".5", ":30") $hours = StringReplace($hours, ".75", ":45") If StringLen($hours) = 5 Then $hours = StringLeft($hours, 1) & "0" & StringRight($hours, 4) EndIf Return ($aInfo[2] & " (GMT" & $hours & ")") EndFunc ;==>_TimeZoneInfo
-
Hi Gurus, can you please give me a kick off on how to achieve this. my PC is already in Eastern Standard Time and I want to create an AutoIt application that can display time representing different time zones of the USA. Maybe I could simply deduct 1 hour each moving from East coast to the West, but my concern is I want to make it as accurate as possible, so simply deducting 1 hour won't do the trick. Thanks much -zbatev