TomasTomecek / sen

Terminal User Interface for containers.
MIT License
990 stars 61 forks source link

Find better datetime parser #123

Closed TomasTomecek closed 6 years ago

TomasTomecek commented 7 years ago

This is what docker returns

2017-03-04T19:48:42.795969549Z
2017-03-04T19:48:42.795969
2017-03-04T19:46:37.257958418Z
2017-03-04T19:46:37.257958
2017-03-04T14:30:42.863920492Z
2017-03-04T14:30:42.863920
2017-03-04T14:28:30.373262771Z
2017-03-04T14:28:30.373262
2017-03-04T14:22:40.67812Z
2017-03-04T14:22:40.67812Z
  File "/home/tt/g/sen/sen/docker_backend.py", line 613, in started_at
    started_at = datetime.datetime.strptime(s, ISO_DATETIME_PARSE_STRING)
  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 365, in _strptime
    data_string[found.end():])
ValueError: unconverted data remains: Z
akashgosai commented 6 years ago

How are we supposed to deal with the Z? IF we know that then we can possibly manipulate the parser

TomasTomecek commented 6 years ago

It's possible that the issue was a flake since I haven't run into it for some time.

TomasTomecek commented 6 years ago

As I indicated in my comment above, this issue is gone and no longer needed to be fixed.