Can someone explain to me why I am not getting the same result?
import datetime,pytz var1 = datetime.datetime(2017,10,25,20,10,50,tzinfo=pytz.timezone("Europe/Athens"))) print(var1)
The output of this code: 2017-10-25 20:10:50+01:35
import datetime,pytz var1 = datetime.datetime(2017,10,25,20,10,50) var1 = pytz.timezone("Europe/Athens").localize(var1) print(var1)
The output of this code: 2017-10-25 20:10:50+03:00
My question is why they have different time zones (1:35 and 3:00). I know that the second code is correct, because my UTC is 3:00 . But can you tell me why I get 1:35 in the first?
source share