Skip to content

Commit 34ea716

Browse files
Improve reliability on non-UTC systems (#5547) (#5550) (#5551)
(cherry picked from commit c1d9aea) Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
1 parent 3c907b7 commit 34ea716

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Tests/Aggregations/Bucket/DateHistogram/DateHistogramAggregationUsageTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ public DateHistogramAggregationWithHardBoundsUsageTests(ReadOnlyCluster i, Endpo
224224

225225
var projects = Project.Projects.OrderBy(p => p.StartedOn).Skip(2).Take(5).ToArray();
226226

227-
_hardBoundsMinimum = projects.Min(p => p.StartedOn.Date);
228-
_hardBoundsMaximum = projects.Max(p => p.StartedOn.Date);
227+
_hardBoundsMinimum = projects.Min(p => DateTime.SpecifyKind(p.StartedOn.Date, DateTimeKind.Utc));
228+
_hardBoundsMaximum = projects.Max(p => DateTime.SpecifyKind(p.StartedOn.Date, DateTimeKind.Utc));
229229
}
230230

231231
protected override object AggregationJson => new

0 commit comments

Comments
 (0)