diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-01-01 21:51:37 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-01-01 21:51:37 +0000 |
commit | f36151556f834deaa1cb0be3f1d6f3fdf73231eb (patch) | |
tree | 89a9344a8562550228f505f2f15100802e273c62 /Python/graminit.c | |
parent | 0233bd9c7d7563392f3fc50d62d7508b52d7de2f (diff) | |
download | cpython-git-f36151556f834deaa1cb0be3f1d6f3fdf73231eb.tar.gz |
A quicker astimezone() implementation, rehabilitating an earlier
suggestion from Guido, along with a formal correctness proof of the
trickiest bit. The intricacy of the proof reveals how delicate this
is, but also how robust the conclusion: correctness doesn't rely on
dst() returning +- one hour (not all real time zones do!), it only
relies on:
1. That dst() returns a (any) non-zero value if and only if daylight
time is in effect.
and
2. That the tzinfo subclass implements a consistent notion of time zone.
The meaning of "consistent" was a hidden assumption, which is now an
explicit requirement in the docs. Alas, it's an unverifiable (by the
datetime implementation) requirement, but so it goes.
Diffstat (limited to 'Python/graminit.c')
0 files changed, 0 insertions, 0 deletions