-
Nicolas Lempereur authored
On UNIX, the timezone modules conversions can be reset by using `time.tzset()`. On windows this is not available and the timezone (TZ) environment variable must be set before the first import of time module. If not, all datetime gotten in python without specifying UTC (such as datetime.datetime.now) could be wrong. This was fixed with 4a77c6a0 in 2013, but has come back since 389c2ba9 imported pkg_resources (which do a `time` module import) before that. closes #14926 opw-693764
Nicolas Lempereur authoredOn UNIX, the timezone modules conversions can be reset by using `time.tzset()`. On windows this is not available and the timezone (TZ) environment variable must be set before the first import of time module. If not, all datetime gotten in python without specifying UTC (such as datetime.datetime.now) could be wrong. This was fixed with 4a77c6a0 in 2013, but has come back since 389c2ba9 imported pkg_resources (which do a `time` module import) before that. closes #14926 opw-693764