Skip to content

ValueError: Unsupported date format #769

@KOLANICH

Description

@KOLANICH

def parse_date(string_date):

author_time, author_offset = parse_date(author_date)

It doesn't work. I have tried passing a datetime object into commit, I have tried passing an integer timestamp, I have tried converting it into a string (both isoformat and ctime) and passing it, and nothing worked.

Finally I have managed to make it accept the datetime using some nasty hack with strings slicing.

I guess that the code is flawed, it shouldn't be so unusable and it should work with python datetime objects. Why don't you use dateutil.parser?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions