When I change tzinfo
on an aware datetime
instance I keep getting the same strftime
result:
>>> from datetime import datetime
>>> import pytz
>>> fmt = '%d.%m.%Y %H:%M'
>>> now_naive = datetime.utcnow()
>>> now_naive.strftime(fmt)
'02.08.2017 11:53'
>>> now_aware = now_naive.replace(tzinfo=pytz.timezone('UTC'))
>>> now_aware_minus_3 = now_aware.replace(tzinfo=pytz.timezone('Etc/GMT-3'))
>>> now_aware.strftime(fmt)
'02.08.2017 11:53'
>>> now_aware_minus_3.strftime(fmt)
'02.08.2017 11:53'
Why is that? how do I display current time in different timezone?