Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #96526
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Subject | Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo? |
| References | (11 earlier) <201509131224.t8DCOXHO004891@fido.openend.se> <CAExdVNkN465=bWeY61PFAxpiUQ-u0p2zaqtwH8PQWyQO4Jw9Mg@mail.gmail.com> <201509131600.t8DG07e0025688@fido.openend.se> <CAExdVNm3e43mJ3tqcUc9175WssV4zeuO024svJbMTjrTab=Qew@mail.gmail.com> <CAExdVN=RPPVUYWpAUwHWpvy0vMz7zbjFHawYxYfDwuhbFM8B+A@mail.gmail.com> |
| Date | 2015-09-13 22:31 +0200 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.498.1442176304.8327.python-list@python.org> (permalink) |
In a message of Sun, 13 Sep 2015 15:13:53 -0500, Tim Peters writes: >[Laura] >> Via Rail will give you a schedule when you book your tickets. But I >> am wrong, it gives it to you in local time, which you can scrape or >> even use the via rail api. So it is the person getting off in >> Creighton who wants to tell his relatives back in Halifax what >> time he is arriving (in their time) (so they can call him and >> avoid the hellish hotel surtax on long distance calls) who will >> have the problem. > >Whatever time zone the traveler's railroad schedule uses, so long as >it sticks to just one This is what does not happen. Which is why I have written a python app to perform conversions for my parents, in the past. >But there's nothing new here: datetime has been around for a dozen >years already, and nobody is proposing to add any new basic >functionality to tzinfos. PEP 495 is only about adding a flag to >allow correct conversion of ambiguous local times (typically at the >end of DST, when the local clock repeats a span of times) to UTC. So >if this were a popular use case, I expect we would already have heard >of it. Note that Python zoneinfo wrappings are already available via, >at least, the pytz and dateutil packages. I am a happy user of pytz. On the other hand, I think this means that my brain has gone through some sort of non-reversible transformation which makes me accurate, but not exactly sane on the issue. I think I have misunderstood Alexander Belopolsky as saying that datetime had functionality which I don't think it has. Thus I thought we must be planning to add some functionality here. Sorry about this. However, people do need to be aware, if they are not already, that people with 3 times in 3 different tz will want to sort them. Telling them that they must convert them to UTC before they do so is, in my opinion, a very fine idea. Expecting them to work this out by themselves via a assertion that the comparison operator is not transitive, is, I think, asking a lot of them. Laura
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo? Laura Creighton <lac@openend.se> - 2015-09-13 22:31 +0200
csiph-web