You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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, eventuallygrit might just be what you need.
GitPython/git/objects/util.py
Line 131 in c6e0a6c
GitPython/git/objects/commit.py
Line 348 in f3265bd
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 (bothisoformat
andctime
) 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 usedateutil.parser
?The text was updated successfully, but these errors were encountered: