FangYX Posted February 10, 2021 Share Posted February 10, 2021 How to make os.date working with gmt? Or Does anyone have raw date & time site that working with gmt? Link to comment Share on other sites More sharing options...
FangYX Posted February 11, 2021 Author Share Posted February 11, 2021 Just now, Fathoni267 said: I've found the code! GMT+0 os.date("!%Y-%m-%d %X") GMT+7 os.date("!%Y-%m-%d %X", os.time()+7*60*60) Oh I just realized. It's only based with local time, so it can still be manipulated:( Link to comment Share on other sites More sharing options...
FangYX Posted February 14, 2021 Author Share Posted February 14, 2021 I figured out how to prevent local date from being changed Date = os.date("!%a, %d %b %Y %H:%M") gg.sleep(100) --This is for matching the local date with online date if Date ~= string.match(gg.accessLink("https://exemple.com").headers["Date"][1], ("(.*):")) then --You can replace the website with anything but the website can still be accessed gg.alert(" Invalid Date/Time ") print(" Set your date/time correctly ") return else Date = os.date("!%Y/%m/%d %X", --You can change it as your date format os.time()+7*60*60) --This is for GMT+7 end Link to comment Share on other sites More sharing options...
FangYX Posted February 11, 2021 Author Share Posted February 11, 2021 19 hours ago, Fathoni267 said: How to make os.date working with gmt? I've found the code! GMT+0 os.date("!%Y-%m-%d %X") GMT+7 os.date("!%Y-%m-%d %X", os.time()+7*60*60) Link to comment Share on other sites More sharing options...
Question
FangYX
How to make os.date working with gmt?
Or
Does anyone have raw date & time site that working with gmt?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.