Skip to content

Latest commit

 

History

History
9 lines (9 loc) · 610 Bytes

README.md

File metadata and controls

9 lines (9 loc) · 610 Bytes

How To Work


You just need to set your desired IP in line 4 and your desired port in line 5. Then in line 14, enter the hour and minute offset of your country instead of the entry of the SetOffset function in seconds. Then call the GetDateTime() function anywhere in the code, it will return a string consisting of the date and time at the moment. If you do not enter offset, you will see UTC Datetime.
I hope it will be useful for you.
If you are from Iran, the time.nist.gov site may not work sometimes; So preferably use an internal IP.