[Datetime-SIG] What's are the issues?
Chris Barker
chris.barker at noaa.gov
Wed Jul 29 00:54:38 CEST 2015
On Tue, Jul 28, 2015 at 2:38 PM, Felipe Ochoa <felipe.nospam.ochoa at gmail.com
> wrote:
> Here is my best shot at categorizing the different outstanding design
> issues:
>
great, thanks!
My thoughts:
(some obvious)
NOTE: I'm assuming that timedelta is the same as it is now -- i.e. "naive",
or simply representing a timespan nothing t do with calendars.
1. Datetime arithmetic
> a) datetime +/- timedelta
> i. Naive (no tzinfo) datetime objects
>
same as now
> ii. Aware (with tzinfo) datetime objects
>
If the math is done in UTC, then there is no issue, yes? the timedelta is
added or subtracted, and the result has the same tzinfo object.
> b) datetime - datetime
> i. When both are naive
>
same as now.
> ii. When both have same tzinfo
>
Just do the math. Store as UTC makes it easy. return a timedelta.
> iii. When the two have different tzinfos
>
Do the math in UTC, return a timedelta.
> 2. Inter-timezone conversion
> a) adding an isdst (or which) attribute
>
yup -- and I've bike-shedeed enough without getting into what to call it!
> b) algorithm specification
>
what part of the algorithm? seems pretty straightforward to me (the
algorithm, anyway)
So really a lot of bike-shedding on pyton-dev ;-)
-CHB
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150728/9875b9f2/attachment.html>
More information about the Datetime-SIG
mailing list