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
Parse ISO 8601 basic format (hhmmss) #87
Comments
Hey ! :) Are you not interested or did you not see my message (or didn't have the time to respond) ? |
Apologies for the delay in replying...yes, this looks like a legit issue, and there are a number of similar things I'm wanting to address in the next update regarding bugs in ISO parsing. Feel free to address in a pull request in the mean time, though! |
#108 looks like a duplicate of this |
I can no longer reproduce this. Can you @C4ptainCrunch |
I'm in a quite long trip abroad and I don't have access to a full blown
computer until mid September but I'll check as soon as I get back, I
promise :)
|
It looks that Arrow does not parse this format anymore
|
I can confirm that arrow 0.12.1 is still not parsing basic ISO-8601 date/time strings without separators, such as 20180710T230024 and 20180710T230024Z. I get the following error:
It looks like the |
At the moment being,
arrow.get
ignores the seconds if the datetime is in the basic format (hhmmss
) and not in the extended format (hh:mm:ss
) (see wikipedia article for more info)If I add microseconds, output is correct
A part of the problem looks like the
has_seconds
detection in arrow/parser.py:70 is wrong. (Sould checklen(time_parts[0])
if no:
were found)If it's ok with you i'll send a pull request in the next few days fixing the detection, the parsing (i didn't check i it need to be fixed as well) and adding new tests.
Edit : After a rapid test it looks like adding
has_seconds = not has_seconds and len(time_parts[0]) == 6
after line 70 fixes the problem. (But i still will investigate futher and write some tests)The text was updated successfully, but these errors were encountered: