Buckw1 Posted July 2, 2006 Share Posted July 2, 2006 (edited) I have tried every script I coul dfind related to GMT in these forums...and I just can;t get my head around the code! I know I need this to figure out local timezone: $a1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\" _ & RegRead ('HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation','StandardName'),'Display') $a1=StringMid($a1,6,2)*_Iif(StringMid($a1,5,1)='+',1,-1) and this should return the GMT time but it does not.. $sNewDate = _DateAdd( 'h',$a1, _NowCalc()) MsgBox( 4096, "", "Current GMT time : " & $sNewDate ) I want local time to UTC conversion. What am I missing? According to example given in Beta help file this code should show a change in minutes. It does not on my PC. Try and let me know. #include <Date.au3> $sNewDate = _DateAdd( 'n' ,5, _NowCalc() ) MsgBox( 4096, "", "Current time: " & _NowCalc()&" after adding 5 minutes " & $sNewDate) Edited July 2, 2006 by Buckw1 Link to comment Share on other sites More sharing options...
Developers Jos Posted July 2, 2006 Developers Share Posted July 2, 2006 According to example given in Beta help file this code should show a change in minutes. It does not on my PC. Try and let me know. #include <Date.au3> $sNewDate = _DateAdd( 'n' ,5, _NowCalc() ) MsgBox( 4096, "", "Current time: " & _NowCalc()&" after adding 5 minutes " & $sNewDate)Works for me .... --------------------------- --------------------------- Current time: 2006/07/02 09:52:56 after adding 5 minutes 2006/07/02 09:57:56 --------------------------- OK --------------------------- SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
randallc Posted July 2, 2006 Share Posted July 2, 2006 (edited) Hi, Not on mine though; "Current time: 2006/07/02 19:18:14 after adding 5 minutes 2006/07/02 19:18:14" Months years and days and weeks work... And Days and hours both add to days! And mins and secs not working! What is this?... Randallc Edited July 2, 2006 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Developers Jos Posted July 2, 2006 Developers Share Posted July 2, 2006 Hi,Not on mine though;"Current time: 2006/07/02 19:18:14 after adding 5 minutes 2006/07/02 19:18:14"Months years and days and weeks work...And Days and hours both add to days!And mins and secs not working!What is this?...RandallcWhat version AutoIt3 and UDF's are you using ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
randallc Posted July 2, 2006 Share Posted July 2, 2006 Hi, Not sure; does this help? >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "C:\Programs\SearchEngine\Tutorials\dateaddon.au3" /autoit3dir "C:\Program Files\AutoIt3\beta" /UserParams >Running AU3Check (1.54.1.1) params: from:C:\Program Files\AutoIt3\beta +>AU3Check ended.rc:0 >Running:(3.1.1.128):C:\Program Files\AutoIt3\beta\autoit3.exe "C:\Programs\SearchEngine\Tutorials\dateaddon.au3" Current time: 2006/07/02 22:05:02 after adding 5 minutes 2006/08/06 22:05:02 +>AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 6.324 Randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Developers Jos Posted July 2, 2006 Developers Share Posted July 2, 2006 Hi, Not sure; does this help? >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "C:\Programs\SearchEngine\Tutorials\dateaddon.au3" /autoit3dir "C:\Program Files\AutoIt3\beta" /UserParams >Running AU3Check (1.54.1.1) params: from:C:\Program Files\AutoIt3\beta +>AU3Check ended.rc:0 >Running:(3.1.1.128):C:\Program Files\AutoIt3\beta\autoit3.exe "C:\Programs\SearchEngine\Tutorials\dateaddon.au3" Current time: 2006/07/02 22:05:02 after adding 5 minutes 2006/08/06 22:05:02 +>AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 6.324 Randallc 3.1.1.127 was still OK, but 3.1.1.128 is giving this problem... Will investigate... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Developers Jos Posted July 2, 2006 Developers Share Posted July 2, 2006 (edited) For some reason this test in _TicksToTime() now fails in the latest release: If StringIsInt($iTicks) ThenoÝ÷ Øp¢¹,~)Þ§r§çm¡«¢+Ù%9ÕµÈ ÀÌØí¥Q¥Ì¤ÐìÀQ¡¸ Edited July 2, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Buckw1 Posted July 2, 2006 Author Share Posted July 2, 2006 (edited) Glad I found a bug Fix works as intended. Thanks. Buck BTW, the issue with requiring the "> 0" is not exclusive to this function. It shows itself in most commands now. Edited July 2, 2006 by Buckw1 Link to comment Share on other sites More sharing options...
Developers Jos Posted July 2, 2006 Developers Share Posted July 2, 2006 BTW, the issue with requiring the "> 0" is not exclusive to this function. It shows itself in most commands now.Can you explain what you mean and which function is wrong ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
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