Forwarding to the list.. ---------- Forwarded message --------- From: Morten W. Petersen <morp...@gmail.com> Date: Tue, Mar 1, 2022 at 12:52 PM Subject: Re: Timezone for datetime.date objects To: Chris Angelico <ros...@gmail.com>
On Mon, Feb 28, 2022 at 11:57 PM Chris Angelico <ros...@gmail.com> wrote: > On Tue, 1 Mar 2022 at 09:28, Morten W. Petersen <morp...@gmail.com> wrote: > > > > Hi Chris, Cameron. > > > > Well, let's say I specify the datetime 2022-02-22 02:02 (AM). I think > everyone could agree that it also means 2022-02-22 02:02:00:00, to > 2022-02-22 02:02:59:59. > > > > Not sure how many :59s you want there :) I'm going to assume you mean > "02:02:00" to "02:02:59". > > > And I think the same applies for a date. If the pipes are clogged and I > can't take (give) a shit, a shower or do anything else involving fluids, I > can just leave the keys under the doormat, and agree a date with the > plumber, and go off to a friend of relatives' place for a couple of days > while waiting for the plumber to do the necessary work. > > > > That is one of the fundamental differences between humans and > computers. Humans are very VERY sloppy with time descriptions. With > computers, it's much better to be clear about time ranges; a time does > not imply a specific window size. (And autistic humans are more like > computers.) > > Yep. Well, as I said, I could create some range objects myself, and even create a little module and put it up on pypi, if I couldn't find any existing module I could use. As we're discussing this, it is clear that different points can be made, and as for the Python standard library, it is what it is today, and part of the reason I was posting this email was to see if it should be changed, amended/appended to include range. I've worked a bit with dates, date searches and so on, and having existing range classes and objects to work with, defined in the standard library, seems like a natural and useful thing. Time, as humans have defined it with timezones, leap years, leap seconds, Denmark not following the atomic clock etc. is a bit messy, and it is easy to make mistakes creating custom code dealing with it. Regards, Morten -- I am https://leavingnorway.info Videos at https://www.youtube.com/user/TheBlogologue Twittering at http://twitter.com/blogologue Blogging at http://blogologue.com Playing music at https://soundcloud.com/morten-w-petersen Also playing music and podcasting here: http://www.mixcloud.com/morten-w-petersen/ On Google+ here https://plus.google.com/107781930037068750156 On Instagram at https://instagram.com/morphexx/ -- I am https://leavingnorway.info Videos at https://www.youtube.com/user/TheBlogologue Twittering at http://twitter.com/blogologue Blogging at http://blogologue.com Playing music at https://soundcloud.com/morten-w-petersen Also playing music and podcasting here: http://www.mixcloud.com/morten-w-petersen/ On Google+ here https://plus.google.com/107781930037068750156 On Instagram at https://instagram.com/morphexx/ -- https://mail.python.org/mailman/listinfo/python-list