I code on my own computer which is set the CET +02:00 (at least now, that will become +01:00 around October, I think. However, the software I create is often used on another computer, which uses standard UTC.
Hence, on my computer I have optimized my dates for my CET time, since that is how people that uses the software will use.
However, when I do something like this on my computer:
import datetime
import pytz
date = datetime.datetime(2022, 6, 10, 0, 0, 0).astimezone(pytz.UTC)
The resulting date is:
2022-06-09 22:00:00+00:00
Which is the correct UTC value compared to my computers timezone (which is the correct one).
But when this is run on a computer with a different timezone the result becomes:
2022-06-10 00:00:00+00:00
I was kind of hoping there was an easy way to make sure this doesn't happen, so that the date is not different on computers with different timezones than my own.