I am using from dateutil import parser
to parse an input but for some reason it is giving me back the wrong timezone.
My code:
parser.parse(input_date)
Input: Tue May 01 2018 13:23:00 GMT+0200 (CEST)
Output: 2018-05-01 13:23:00-02:00
Does anybody know why the parse method changes the +2
timezone to -2
?
Because the issue is open on github as Paul said I had to make a custom solution. I parsed the input using re
and changed it from:
Tue May 01 2018 13:23:00 GMT+0200 (CEST)
to Tue May 01 2018 13:23:00 +0200
, dateutil.parser.parse
had no problem parsing this format.