I'm trying to convert time in two time zones in Python, and I have following problem.
The code
import pytz
import datetime
chicago_timezone = pytz.timezone("America/Chicago")
polish_time_zone = pytz.timezone("Europe/Warsaw")
chicago_time = datetime.datetime(2020,6,25,8,0,0,0,chicago_timezone)
print(chicago_time)
polish_time = chicago_time.astimezone(polish_time_zone)
print(polish_time)
The output
2020-06-25 08:00:00-05:51
2020-06-25 15:51:00+02:00
While correct polish time should be 2020-06-25 15:00:00 (seven hour difference). Can someone guide me on this? It's a bit puzzling to me and I can't understand why it is not working as I expected.