Skip to content
Snippets Groups Projects
  • Nicolas Lempereur's avatar
    07bf7bf4
    [FIX] odoo-bin: server UTC timezone on windows · 07bf7bf4
    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
    07bf7bf4
    History
    [FIX] odoo-bin: server UTC timezone on windows
    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
odoo-bin 240 B