Python 3.9 has a new zoneinfo module in the standard library. For <3.9, use a third-party library like pytz to "localize" the datetime object with the timezone of choice.
> 原文:[https://www . geeksforgeeks . org/如何用 python 中的不同时区转换日期和时间/](https://www.geeksforgeeks.org/how-to-convert-date-and-time-with ...