-
Notifications
You must be signed in to change notification settings - Fork 198
Datetime filter rounding bug on [UTC] property #877
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
Comments
Just found #610 which clarifies the different datetime formats. Though the |
neo4j.time.DateTime().to_native()
stored as [UTC], datetime.datetime()
stored as Z, MATCH datetime filter rounding bug
Hello and thanks for reaching out. I was puzzled like you as to what's going on here. After asking colleagues I was pointed to this piece of Cypher documentation. Which states
Now that was surprising to me as well, but that's what Cypher does. So the driver can't do anything about it.
will return You could try to play around with I'll close this as this is not a driver issue (other than the limitation of not being able to tell |
I see, that is very unexpected, so one should be careful have consistent timezone types in the database. Thank you for clarifying |
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
Current behaviour
Using
neo4j.time.DateTime().to_native()
as query param stores datetime property as2022-12-13T00:00:00[UTC]
Using
datetime.datetime()
as query param stores datetime property as2022-12-13T00:00:00Z
Matching nodes
MATCH (t:Test) WHERE t.datetime <= datetime($dtFilter)
seems to behave differently for[UTC]
datetime property vsZ
datetime property. Seems like a rounding bug.Expected behaviour
neo4j.time.DateTime().to_native()
anddatetime.datetime()
query parameter should store datetime property in same format.See #610
MATCH (t:Test) WHERE t.datetime <= datetime($dtFilter)
should behave the same for[UTC]
datetime property andZ
datetime property.Reproduced code:
My Environment
Python Version: 3.10.8
Driver Version: 5.1.0
Server Version and Edition: 4.4.6 Community
Possibly related:
#306
#748
The text was updated successfully, but these errors were encountered: