-
Notifications
You must be signed in to change notification settings - Fork 32
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
Datetimes with all-zero time component (exact midnight) are detected as dates #35
Comments
Thanks for this, it seems like the best solution would be a |
Correct me if I'm wrong, but the intention of the If that is correct, then my understanding is that in this use case the 'downcasting' behaviour is undesirable and as such Does that make sense? 😄 |
Not really, it's there just to give a value to |
Ah, I think I understand (we both meant the same thing but were describing it differently I think). In the cases you have linked, would it perhaps be simpler just to return |
Working on this now. A bit trickier than I thought. The issue is that regular |
* fixes: Bump to version 0.44.0 [DOCS] Update doc blocks and doctests [CHANGE] Reorder by_field guess_funcs to match by_value [FIX] Properly detect midnight times (closes #35) Allow pypy3 to fail CI
Datetime values with all-zero time components are detected as dates by
process.detect_types
. This is becausetypetools.is_datetime
explicitly checks that the time component is not'00:00:00'
meza/meza/typetools.py
Line 295 in a56b927
Example Test Case
Fails with:
Making the time part non-zero will pass the test.
Potential Solutions
detect_types
that is passed down tois_datetime
to change the behaviour from "can this only be parsed as a datetime" to "this is a datetime"I am happy to implement the changes required after a decision is made on the correct behaviour 😄
The text was updated successfully, but these errors were encountered: