Skip to content

strptime does not handle nanoseconds for  #91

@gongy

Description

@gongy

Using DateTime64(9, 'UTC') - the python parser is not able to translate the 9 digits of precision. The error is

  File "aiochclient/_types.pyx", line 29, in aiochclient._types._datetime_parse_f
  File "/usr/lib/python3.9/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib/python3.9/_strptime.py", line 352, in _strptime
    raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: 64

For some reason it only happens on Python 3.9. Happy to patch this if you have opinion/direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions