Python Forum
Confusion with datetime 'dst' function result
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Confusion with datetime 'dst' function result
#3
I'm not able to answer the question but from what I read elsewhere, using the arrow module could be the solution to these issues.
>>> import arrow
>>> a = arrow.now('US/Eastern')
>>> a
<Arrow [2019-11-15T15:34:42.463220-05:00]>
>>> b = a.shift(days=-180)
>>> b
<Arrow [2019-05-19T15:34:42.463220-04:00]>
>>> a.dst()
datetime.timedelta(0)
>>> b.dst()
datetime.timedelta(0, 3600)
Reply


Messages In This Thread
RE: Confusion with datetime 'dst' function result - by Gribouillis - Nov-15-2019, 08:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  unable to use result of solver in another function ross1993hall 0 1,429 Aug-10-2020, 10:29 AM
Last Post: ross1993hall
  Pass integers to datetime.date function florian 3 2,755 Jul-18-2020, 04:43 AM
Last Post: scidam
  How to use function result in another function Ayckinn 4 2,870 Jun-16-2020, 04:50 PM
Last Post: Ayckinn
  Pandas's regular expression function result is so strange cools0607 6 3,259 Jun-15-2020, 07:34 AM
Last Post: cools0607
  TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'str' findbikash 2 9,682 Sep-18-2019, 08:32 AM
Last Post: buran
  readshapefile function in basemap - confusion regarding arguments sendiptangshu 1 2,570 Mar-09-2019, 09:29 AM
Last Post: Larz60+
  Erratic Datetime result timsch 0 2,052 Dec-27-2018, 01:49 AM
Last Post: timsch
  SQLAlchemy DateTime result 0's AMarotta97 0 2,291 Oct-01-2018, 04:35 AM
Last Post: AMarotta97
  Why the IDE cannot show the result of zip function? Tony 2 2,945 May-19-2018, 02:58 AM
Last Post: Tony
  confusion on print function volcano 3 3,684 Mar-11-2018, 10:41 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020