[Python-Dev] Aware datetime from naive local time Was: Status on PEP-431 Timezones (original) (raw)
Alexander Belopolsky alexander.belopolsky at gmail.com
Mon Apr 13 21:14:23 CEST 2015
- Previous message (by thread): [Python-Dev] Aware datetime from naive local time Was: Status on PEP-431 Timezones
- Next message (by thread): [Python-Dev] Aware datetime from naive local time Was: Status on PEP-431 Timezones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Apr 13, 2015 at 2:05 PM, Chris Barker <chris.barker at noaa.gov> wrote:
However, different UTC times may map to the same wall time and some
expressible wall times are not results of a map of any UTC time.
got it. I suggest you perhaps word it something like: walltime = f( location, utctime) and utctime = f( location, utctime ) These are two different problems, and one is much harder than the other! (though both are ugly!)
You probably meant "utc_time = f( location, wall_time)" in the last equation, but that would still be wrong. A somewhat more correct equation would be
utc_time = f^(-1)( location, wall_time)
where f^(-1) is the inverse function of f, but since f in not monotonic, no such inverse exists.
Finding the inverse of f is the same as solving the equation f(x) = y for any given y. If f is such that this equation has only one solution for all possible values of y then an inverse exists, but this is not so in our case. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150413/7e265695/attachment.html>
- Previous message (by thread): [Python-Dev] Aware datetime from naive local time Was: Status on PEP-431 Timezones
- Next message (by thread): [Python-Dev] Aware datetime from naive local time Was: Status on PEP-431 Timezones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]