summaryrefslogtreecommitdiffstats
path: root/Doc/lib/tzinfo-examples.py
Commit message (Collapse)AuthorAgeFilesLines
* "Premature" doc changes, for new astimezone() rules, and the newTim Peters2003-01-221-4/+4
| | | | | | | | | tzinfo.fromutc() method. The C code doesn't implement any of this yet (well, not the C code on the machine I'm using now), nor does the test suite reflect it. The Python datetime.py implementation and test suite in the sandbox do match these doc changes. The C implementation probably won't catch up before Thursday (Wednesday is a scheduled "black hole" day this week <0.4 wink>).
* New rule for tzinfo subclasses handling both standard and daylight time:Tim Peters2003-01-201-1/+1
| | | | | | | | | | | | When daylight time ends, an hour repeats on the local clock (for example, in US Eastern, the clock jumps from 1:59 back to 1:00 again). Times in the repeated hour are ambiguous. A tzinfo subclass that wants to play with astimezone() needs to treat times in the repeated hour as being standard time. astimezone() previously required that such times be treated as daylight time. There seems no killer argument either way, but Guido wants the standard-time version, and it does seem easier the new way to code both American (local-time based) and European (UTC-based) switch rules, and the astimezone() implementation is simpler.
* Purged reference to defunct datetimetz.Tim Peters2003-01-091-1/+1
|
* A new implementation of astimezone() that does what we agreed on in allTim Peters2003-01-041-1/+62
| | | | | | cases, plus even tougher tests of that. This implementation follows the correctness proof very closely, and should also be quicker (yes, I wrote the proof before the code, and the code proves the proof <wink>).
* Replaced the flawed "local time" example tzinfo class with the gutsTim Peters2003-01-031-13/+39
| | | | of Guido's later Local.py (from the datetime sandbox).
* The tzinfo methods utcoffset() and dst() must return a timedelta objectTim Peters2003-01-021-7/+8
| | | | | | (or None) now. In 2.3a1 they could also return an int or long, but that was an unhelpfully redundant leftover from an earlier version wherein they couldn't return a timedelta. TOOWTDI.
* Move the examples of concrete tzinfo classes to a separate file, so theFred Drake2002-12-231-0/+51
verbatim environment does not bollux page breaking.