0

I'm trying to convert a string to DateTime object, The string:

Saturday 8th of August 2020 07:48:11 AM CDT

I'm using arrow package

arrow.get('Saturday 8th of August 2020 09:23:34 AM CDT', 'dddd Mt[h] of MMMM YYYY HH:mm:ss A ZZZ')

I'm getting the following error

arrow.parser.ParserError: Could not parse timezone expression "CDT"

I couldn't find any way to convert the CDN part into timezone.

joris
  • 133,120
  • 36
  • 247
  • 202
Alon Barad
  • 1,491
  • 1
  • 13
  • 26
  • Arrow gets its time zones from IANA via dateutil, per https://arrow.readthedocs.io/en/latest/#t4. Is CDT included there? – jonrsharpe Aug 08 '20 at 14:49

1 Answers1

0

Has said in the documentation, some abbreviations are ambiguous. You can use for example America/Chicago instead of CDT

AlexisG
  • 2,476
  • 3
  • 11
  • 25