On 28/07/2015 03:15, Tim Peters wrote:
[Mark Lawrence <breamore...@yahoo.co.uk>]
To me a day is precisely 24 hours, no more, no less.  I have no interest in
messing about with daylight savings of 30 minutes, one hour, two hours or
any other variant that I've not heard about.

In my mission critical code, which I use to predict my cashflow, I use code
such as.

timedelta(days=14)

Is somebody now going to tell me that this isn't actually two weeks?

Precisely define what "two weeks" means, and then someone can answer.

One week == 7 days == 7 * 24 hours
Two weeks = 2 * (one week)


The timedelta in question represents precisely 14 24-hours days, and
ignores the possibility that some day in there may suffer a leap
second.

As I've said elsewhere I've no interest in DST, at least right here, right now, let alone leap seconds. When I run my cashflow forecast the balance in my bank account one year from today isn't going to be influenced by UK clocks falling back to GMT at the end of October and on to BST at the end of next March.


It remains unclear to me which of those outcomes _you_ consider to be
"actually 14 days".  But my bet is that you like what Python already
does here (because "tz-naive arithmetic" is exactly what _I_ want in
all my financial code).


Correct. What I would like to know is how many people are in my position, how many people are in the situation of needing every possible combination of dates, times, daylight saving, local time zone rules and anything else you can think of under the sun, and how many are on the scale somewhere in between these two extremes.

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to