Skip to content

[Hotfix] Fix date format in scheduled job

Dimitra Chatzichrysou requested to merge hotfix into master

Fix for:

    message_json[str(InputMessageKeys.SENT_AT)]
  File "/app/notifications_routing/utils.py", line 133, in convert_timestamp_to_local_timezone
    created_timestamp_at_utc = datetime.strptime(created_timestamp, "%Y-%m-%dT%H:%M:%S.%fZ").replace(tzinfo=tz.tzutc())
  File "/usr/lib64/python3.6/_strptime.py", line 565, in _strptime_datetime
    tt, fraction = _strptime(data_string, format)
  File "/usr/lib64/python3.6/_strptime.py", line 362, in _strptime
    (data_string, format))
ValueError: time data '2021-08-24 11:00:52.342893' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'
Edited by Dimitra Chatzichrysou

Merge request reports

Loading