[PATCH] wrong timezone offset if DST rules changed this year (issue2511)

Sune Foldager cryo at cyanite.org
Fri Nov 18 04:14:39 CST 2011


On 13-11-2011 01:33, Dmitry Panov wrote:
> # HG changeset patch
> # User Dmitry Panov <dop at itoolabs.com>
> # Date 1321144166 0
> # Node ID ca83bd6d909c1ad6b325262ad008c9567e83b036
> # Parent 1bb0a5b02da9ef3505bfb4ac02b2d51cf220220f
> makedate: wrong timezone offset if DST rules changed this year (issue2511)
>
> Python's time module sets timezone and altzone based on UTC offsets of
> two dates: first and middle day of the current year. This approach doesn't
> work on a year when DST rules change.
>
> For example Russia abandoned winter time this year, so the correct UTC
> offset [...]

Wait, you abandoned *winter time*? Usually, winter time is solar time, 
and summer time or DST is adjusted from that :)

-Sune


More information about the Mercurial-devel mailing list