The date today Bug in Python
So as you may know already(for python people). This
import datetime
x = datetime.datetime.now()
print(x.strftime("%x"))
The ouput should be the day's date. And in this case(at least when this post was posted)
03/01/2021
But as you can see here
My code
The output
It prints tomorrow's date (03/02/2021).
Is this a bug or what?
Please fix this mods
Note that this was posted on 03/01/2021, NOT on 03/02/2021 that's why it is not working
Voters
Different timezones. It is probably showing the date for people who live east. At the time you are posting this, it is early morning in the uk, which is where most clocks in python, etc are set to.
@EpicGamer007 how do you I see which time zone
@IcingHackz im not sure how in python.
You can try searching it up. here are a few links i found to get you started:
thanks anyway :D @EpicGamer007