On Fri, 15 Apr 2022 at 03:45, Marco Sulla <marco.sulla.pyt...@gmail.com> wrote:
>
> On Thu, 14 Apr 2022 at 19:16, MRAB <pyt...@mrabarnett.plus.com> wrote:
> >
> > When you're working only with dates, timedelta not having a 'days'
> > attribute would be annoying, especially when you consider that a day is
> > usually 24 hours, but sometimes 23 or 25 hours (DST).
>
> I agree. Furthermore, timedelta is, well, a time delta, not a date
> with a timezone. How could a timedelta take into account DST, leap
> seconds etc?

It can't. It's a simple representation of a time period. It is useful
for situations where you want to express questions like "from this
date/time, wait this long, what will the date/time be?".

In the absence of a corresponding timezone-aware datetime object, it
cannot possibly acknowledge DST.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to