Get the real date?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
EmuMan44
Posts: 1
Joined: 11 Nov 2017, 22:03

Get the real date?

12 Nov 2017, 01:42

I understand that you can use things like CurrentDateTime and FormatTime to output the system date, but is there a way to get the global date from a website or such so the user can't manipulate his system to bypass any date restrictions and such I have in my code? Or does AHK not have any networking compatibility?
User avatar
davebrny
Posts: 85
Joined: 05 Dec 2016, 06:26

Re: Get the real date?

12 Nov 2017, 02:22

you could use urlDownloadToFile and then parse out the text from the html with stringGetPos and stringMid. the simpler the website/html the better since the download will be faster and it might be easy to parse.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Get the real date?

12 Nov 2017, 06:27

I don't know if this will help with what you want, but I thought I'd share it:
urls: get date modified - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=37145
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
just me
Posts: 9464
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Get the real date?

12 Nov 2017, 07:06

GetNetworkTime()
The returned time is UTC.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Araphen, doanmvu, zvit and 257 guests