I am currently using the time module to obtain the date since I use the date as part of the file name that I create. Today being the 28th, when I run the script I get the 29th. Can someone please verify if they obtain the same result. Here is a simple script to run to test the module:
from time import gmtime, strftime
print('The day of the month is: ', strftime("%d", gmtime()))
I am using Windows 11. I have tested this on both IDLE and PyCharm and I obtain the same results.
Here is a screenshot of the IDLE and PyCharm test results:
Yeah, the difference between GMT and UTC is that GMT never locked in any concept of leap seconds, so it’s slightly less precisely defined. As a general rule, you can consider “GMT” to be an archaic term meaning “UTC” and you’ll never be very far wrong.