Answer the question
In order to leave comments, you need to log in
How to convert one timezone to another?
I have dates of the form:
2.3
at 1:00 PM CET
10.1
at 0:00 AM CEST
3.3 at 7:59 PM (UTC+9) date format by specifying the time zone. How to do this, I do not know.
Thanks in advance
Answer the question
In order to leave comments, you need to log in
You need to escape the `datetime.strptime` method.
Signatures here:
https://docs.python.org/3/library/datetime.html#st...
Something like this for "1:00 PM UTC" :
date_object = datetime.strptime(date_string, "%I:%M %p %Z")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question