Skip to content
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

adding proper translation for DateTimeOffsets #406

Merged
merged 4 commits into from
Aug 16, 2023

Conversation

slorello89
Copy link
Member

closes #395

As it stands now DateTimeOffsets are not being parsed correctly in queries, DateTimes are converted to UNIX timestamps before being submitted to a query (based on the local timezone). Using DateTimeOffsets is the 'more correct' way to run date ranges (as it has all the timezone information needed to make an informed decision. The challenge was that you couldn't actually use those in your queries before. This fixes that.

@slorello89 slorello89 linked an issue Aug 11, 2023 that may be closed by this pull request
@slorello89
Copy link
Member Author

Determined that this is a pretty similar issue to #391 - so fixing that as well.

namespace Redis.OM.Unit.Tests;

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class SkipIfMissingEnvVarAttribute : FactAttribute
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😏

@slorello89 slorello89 merged commit 8f0e204 into main Aug 16, 2023
@slorello89 slorello89 deleted the bugfix/datetimeoffset-query-conversion branch December 1, 2023 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect DateTime filtering Date literals not converted to Epoch in aggregation set queries.
3 participants