On 27Feb2022 11:16, Morten W. Petersen <morp...@gmail.com> wrote:
>I was initially using the date object to get the right timespan, but 
>then
>found that using the right timezone with that was a bit of a pain.  So I
>went for the datetime object instead, specifying 0 on hour, minute and
>second.
>
>What's the thinking behind this with the date object?  Wouldn't it be nice
>to be able to specify a timezone?
This has come up before. My own opinion is that no, it would be a bad 
idea. You're giving subday resolution to an object which is inherently 
"days". Leaving aside the many complications it brings (compare two 
dates, now requiring timezone context?) you've already hit on the easy 
and simple solution: datetimes.

I'd even go so far as to suggest that if you needed a timezone for 
precision, then dates are the _wrong_ precision to work in.

Anyway, personally I am -1 on the idea.

Cheers,
Cameron Simpson <c...@cskk.id.au>
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to