Trong Posted 5 hours ago Posted 5 hours ago I have a problem when getting the time to process (with @HOUR @MIN @SEC macros) when changing the time zone, the system time also changes but the macro time is not updated according to the system time. Is this a serious bug of autoit? Regards,
argumentum Posted 4 hours ago Posted 4 hours ago (edited) just curious. Does _NowCalc() behave as it should compared to the @macros ? Edit: Yes, only the macros are wrong. Spoiler expandcollapse popup#include <Date.au3> HotKeySet("{ESC}", "Terminate") Func Terminate() Exit EndFunc ;==>Terminate Exit test() Func test() ; change TimeZones while running this script ConsoleWriteIt() AdlibRegister(ConsoleWriteIt, 5000) ; ConsoleWriteIt every 5 sec. While Sleep(200) WEnd EndFunc ;==>test Func ConsoleWriteIt() ConsoleWrite((_NowCalc() = _NowCalc_viaMacros() ? '-' : '!') & ' NowCalc: ' & _NowCalc() & _ @TAB & TimeZone() & @TAB & 'viaMacros: ' & _NowCalc_viaMacros() & @CRLF) EndFunc ;==>ConsoleWriteIt Func _NowCalc_viaMacros() Return @YEAR & '/' & @MON & '/' & @MDAY & ' ' & @HOUR & ':' & @MIN & ':' & @SEC EndFunc ;==>_NowCalc_viaMacros Func TimeZone() Local $aInfo = _Date_Time_GetTimeZoneInformation() If @error Then Dim $aInfo[8] = [-2] ;~ ShowTimeZoneInformation($aInfo, "") Return StringRight(' ' & $aInfo[1] & '(' & $aInfo[7] & ')', 11) EndFunc ;==>TimeZone ; Show time zone information Func ShowTimeZoneInformation(ByRef $aInfo, $sComment) ConsoleWrite("+ ******************* " & $sComment & " *******************" & @CRLF) Local $aDaylightSavingsSetting[5] = ["Error", "Failure", "not used in the current time zone", _ "operating with standard time", "operating with daylight savings time"] ConsoleWrite("+ Result ............: " & $aInfo[0] & ' = ' & $aDaylightSavingsSetting[$aInfo[0] + 2] & @CRLF) ConsoleWrite("+ Current bias ......: " & $aInfo[1] & @CRLF) ConsoleWrite("+ Standard name .....: " & $aInfo[2] & @CRLF) ConsoleWrite("+ Standard date/time : " & _Date_Time_SystemTimeToDateTimeStr($aInfo[3]) & @CRLF) ConsoleWrite("+ Standard bias......: " & $aInfo[4] & @CRLF) ConsoleWrite("+ Daylight name .....: " & $aInfo[5] & @CRLF) ConsoleWrite("+ Daylight date/time : " & _Date_Time_SystemTimeToDateTimeStr($aInfo[6]) & @CRLF) ConsoleWrite("+ Daylight bias......: " & $aInfo[7] & @CRLF) EndFunc ;==>ShowTimeZoneInformation Edited 25 minutes ago by argumentum better Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted 4 hours ago Posted 4 hours ago 1 hour ago, Trong said: Is this a serious bug of autoit? I opened a trac ticket to fix it. Trong 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now