• 
      

    Fix timezone-related issues with looking up Mercurial commits.

    Review Request #9837 — Created March 27, 2018 and submitted

    Information

    Review Board
    release-3.0.x
    7d5b587...

    Reviewers

    When loading information from Mercurial commits, we assume that server
    timezone is set to UTC. If it's anything else, the commit will be
    converted to the wrong time. This was due to the usage of
    datetime.fromtimestamp, which was converting into the local timezone.
    We now use datetime.utcfromtimestamp to explicitly convert to UTC.

    A unit test was added to test this situation.

    Tested the original issue with a non-UTC timezone set, and saw the
    failures in an existing commit. Also tested that the new unit test also
    fails.

    Verified after the commit that all unit tests pass, no matter my
    configured timezone.

    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (19f62c7)