Skip to content

ValueError: Unsupported date format #769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
KOLANICH opened this issue Jun 9, 2018 · 1 comment
Open

ValueError: Unsupported date format #769

KOLANICH opened this issue Jun 9, 2018 · 1 comment

Comments

@KOLANICH
Copy link

KOLANICH commented Jun 9, 2018

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?

@Byron
Copy link
Member

Byron commented Jun 10, 2018

In a dynamically typed language, things like this may always happen.
As a low-level function is used, one must expect it to only deal gracefully with input exactly as it expects it, without making conversions.

If you are willing to look elsewhere, eventually grit might just be what you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants