My goal is to convert a tz-aware object to a different timezone.
For example - consider the code below where I have a tz-aware object in timezone 'US/Eastern'
:
import pytz
from datetime import timedelta
datetime_est = datetime(2020, 7, 10, 9, 23, 53, tzinfo=pytz.timezone('US/Eastern'))
The problem is that when I print the timestamp
like this: datetime_est.timestamp()
(which should be UTC) I get 2020 July 10 14:19:53. This is +5 hours.
Why +5 when the same time in UTC should be +4?