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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.