from datetime import datetime
import pytz
tz = pytz.timezone("Asia/Singapore")
date_1 = datetime.now(tz=pytz.utc)
print(date_1.replace(tzinfo=tz).replace(tzinfo=pytz.utc).timestamp())
print(date_1.timestamp())
date_2 = datetime.now(tz=tz)
print(date_2.replace(tzinfo=pytz.utc).replace(tzinfo=tz).timestamp())
print(date_2.timestamp())
output:
1483599557.338336
1483599557.338336
1483603457.33842
1483599557.33842
why variable date_2's timestamps are different after tzinfo replaced twice?
since variable date_1 are the same.