Skip to content

Commit 19ab1be

Browse files
Improve reliability on non-UTC systems (#5547) (#5550) (#5552)
(cherry picked from commit c1d9aea) Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
1 parent 7615bf6 commit 19ab1be

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
@@ -226,8 +226,8 @@ public DateHistogramAggregationWithHardBoundsUsageTests(ReadOnlyCluster i, Endpo
226226

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

229-
_hardBoundsMinimum = projects.Min(p => p.StartedOn.Date);
230-
_hardBoundsMaximum = projects.Max(p => p.StartedOn.Date);
229+
_hardBoundsMinimum = projects.Min(p => DateTime.SpecifyKind(p.StartedOn.Date, DateTimeKind.Utc));
230+
_hardBoundsMaximum = projects.Max(p => DateTime.SpecifyKind(p.StartedOn.Date, DateTimeKind.Utc));
231231
}
232232

233233
protected override object AggregationJson => new

0 commit comments

Comments
 (0)