samir500 Posted February 15, 2019 Share Posted February 15, 2019 Hello, i am making a computer limit timer. But i need to check that nobody can change the systemtime. So i want to check online the time, not the date. So i found this http://worldtimeapi.org/ , but it gives to much information, i only need the time for amsterdam, so i can compare it with my systemtime. I found another one but the site is offline http://www.timeapi.org/ . Can somebody help me with this. Link to comment Share on other sites More sharing options...
Nine Posted February 15, 2019 Share Posted February 15, 2019 (edited) #include <Constants.au3> Local $String = BinaryToString(InetRead ( "http://worldtimeapi.org/api/timezone/Europe/Amsterdam",1)) Local $Time = StringRegExp ($String,'"datetime":".+?T(\d+:\d+:\d+)', $STR_REGEXPARRAYMATCH) MsgBox ($MB_SYSTEMMODAL,"",$Time[0]) Thanks for sharing the site Edited February 15, 2019 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
samir500 Posted February 16, 2019 Author Share Posted February 16, 2019 15 hours ago, Nine said: #include <Constants.au3> Local $String = BinaryToString(InetRead ( "http://worldtimeapi.org/api/timezone/Europe/Amsterdam",1)) Local $Time = StringRegExp ($String,'"datetime":".+?T(\d+:\d+:\d+)', $STR_REGEXPARRAYMATCH) MsgBox ($MB_SYSTEMMODAL,"",$Time[0]) Thanks for sharing the site LOL and thank you for helping me out with the script bro Link to comment Share on other sites More sharing options...
Nine Posted February 16, 2019 Share Posted February 16, 2019 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
samir500 Posted February 16, 2019 Author Share Posted February 16, 2019 (edited) Sorry another question how can i reset the time to the current time. People on forums says you can do it with _Date_Time_SetLocalTime($Time), but it doesn't set the system time back to the original time. Do i need some privileges to do that. Edited February 16, 2019 by samir500 Link to comment Share on other sites More sharing options...
Nine Posted February 16, 2019 Share Posted February 16, 2019 The parameter is a structure not a string. Help file will guide you thru. If you need more help, post your code in here. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Dwalfware Posted February 17, 2019 Share Posted February 17, 2019 there is a json UDF aome where also you can use 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