-
-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forcing all DateTimeOffset queries that involve comparisons to be uni…
…versal time. Closes GH-3590
- Loading branch information
1 parent
53e0257
commit a0ee4c7
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Marten; | ||
using Marten.Testing.Documents; | ||
using Marten.Testing.Harness; | ||
|
||
namespace LinqTests.Acceptance; | ||
|
||
public class against_date_time_offset : IntegrationContext | ||
{ | ||
public against_date_time_offset(DefaultStoreFixture fixture) : base(fixture) | ||
{ | ||
} | ||
|
||
[Fact] | ||
public async Task query_against_date_time_offset_that_is_not_universal_time() | ||
{ | ||
await theStore.BulkInsertDocumentsAsync(Target.GenerateRandomData(1000).ToArray()); | ||
|
||
var results = await theSession.Query<Target>().Where(x => x.DateOffset < DateTimeOffset.Now.AddDays(-1)) | ||
.ToListAsync(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters