D369: util: add `hgdatetopython` to convert hg-style dates to datetimes

phillco (Phil Cohen) phabricator at mercurial-scm.org
Tue Aug 15 14:03:09 EDT 2017


phillco added inline comments.

INLINE COMMENTS

> durin42 wrote in util.py:1862
> This function makes me really nervous, because it's a naive datetime rather than a tz-aware datetime. Could we do better about preserving the exact point-in-time value of the tz-aware time information?
> 
> ("no" is a possible answer here, but I'd really like to know why we're not storing the zone offset in the datetime object.)

Hm, good question. I only do that because that's what the earlier code did -- that change dates from `87c6ad2251d8703d7f16d51e99e3d1c040f0be49`, I think.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D369

To: phillco, #hg-reviewers
Cc: durin42, lothiraldan, mercurial-devel


More information about the Mercurial-devel mailing list