Parsing and formatting dates


Originally published at:
Parsing dates from strings and back again. It’s more complicated than you think!


I was curious why the timezone shows as -5:00 when parsing with timezone “US/Central” even tough at here it’s listed as -6:00. I’ve noticed the same difference with my own timezone - “Europe/Sofia” - and it shows +3:00 instead of +2:00.


After some more googling and playing around with the repl I think I found it - the 1 hour deviation is due to the daylight saving.