Jump to content
  • 0

GMT Date & Time


FangYX

Question

3 answers to this question

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.