Re: Struggling to understand timedelta rpesentation when applying an offset for an hour earlier - why is days = -1?

2021-08-31 Thread Dennis Lee Bieber
On Tue, 31 Aug 2021 03:59:52 -0700 (PDT), dcs3spp via Python-list declaimed the following: >I cannot understand why the resultant datetime.timedelta is days=-1, >seconds=82800 (23 hours) . > Read the documentation... https://docs.python.org/3/library/datetime.html#timedelta-objects >

Re: Struggling to understand timedelta rpesentation when applying an offset for an hour earlier - why is days = -1?

2021-08-31 Thread Chris Angelico
On Wed, Sep 1, 2021 at 1:55 AM dcs3spp via Python-list wrote: > > Hi, > > I wonder if anyone can help > > I am struggling to understand the representation of timedelta when used in > conjunction with astimezone. > > Given the code below, in a python interactive interpreter, I am trying to >

Struggling to understand timedelta rpesentation when applying an offset for an hour earlier - why is days = -1?

2021-08-31 Thread dcs3spp via Python-list
Hi, I wonder if anyone can help I am struggling to understand the representation of timedelta when used in conjunction with astimezone. Given the code below, in a python interactive interpreter, I am trying to calculate a resultant datetime an hour earlier from a UTC datetime ```bash