-
-
Notifications
You must be signed in to change notification settings - Fork 79
Bug fix: Convert dateTimes #266
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
Bug fix: Convert dateTimes #266
Conversation
PR Summary
|
alirezanet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @saulius-saltenis-Devoteam,
Looks good to me, but it would be nice if you add a couple of unit-tests to validate the old and new behavior
|
Will add either later today, or tomorrow |
|
Added a test for ensuring that the final query filters with same timestamp as passed via input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💐👌 Thanks 🍻
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
I store UTC timestamps in DB, and pass ISO timestamps for filtering operations.



When ISO timestamp is passed, it's first converted to
DateTimewith additional local timezone offset. Later, it'sKindis set to UTC. This only changes theKindproperty, retaining the previously added timezone ticks.For this reason, the following request:


Turns into this query:
This behavior can be easily reproduced with the following sample, when environment has a timezone:
Fixes # (issue)
Type of change
Checklist