with python's datetime package, I'm seeing a ~8min time difference between datetime.now().timestamp() and datetime(year, month, day, hour, minute, second, [tz]).timestamp(), when I put now's time in the latter formula. With or without the tz, which is timezone, the 8min difference stays there. Anyone can explain where it went wrong? Thanks!
You can (and should) use tzinfo.localize()
instead.