How to make a timezone aware datetime object

Опубликовано: 31 Октябрь 2024
на канале: The Python Oracle
63
0

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 3 Looping

--

Chapters
00:00 Question
02:37 Accepted answer (Score 821)
03:19 Answer 2 (Score 349)
04:04 Answer 3 (Score 114)
04:36 Answer 4 (Score 48)
04:53 Thank you

--

Full question
https://stackoverflow.com/questions/7...

Question links:
[How do I get a value of datetime.today() in Python that is "timezone aware"?]: https://stackoverflow.com/questions/4...

Accepted answer links:
[localize method]: http://pytz.sourceforge.net/#localize...

Answer 2 links:
[this SO answer]: https://stackoverflow.com/a/25662061/...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/l...

--

Tags
#python #datetime #timezone #pythondatetime #pytz

#avk47