From 41bf6baf7256cfa2619457bb47a935b61d0e7a7b Mon Sep 17 00:00:00 2001 From: Øyvind Grønnesby Date: Wed, 3 Nov 2021 12:39:12 +0100 Subject: Make the bill end date inclusive instead of exclusive Before the end date for the billing was used to calculate startOfDay to generate the timestamp we actually use. Now we are changing it to .plusDays(1).startOfDay to make it so UI will effectively use the end of today as the timestamp. Also added some more implementations to ManualClock to get some tests to work. --- testutil/src/main/java/com/yahoo/test/ManualClock.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testutil/src') diff --git a/testutil/src/main/java/com/yahoo/test/ManualClock.java b/testutil/src/main/java/com/yahoo/test/ManualClock.java index e49c7df3882..ce3ae6d77df 100644 --- a/testutil/src/main/java/com/yahoo/test/ManualClock.java +++ b/testutil/src/main/java/com/yahoo/test/ManualClock.java @@ -48,10 +48,10 @@ public class ManualClock extends Clock { public Instant instant() { return currentTime.get(); } @Override - public ZoneId getZone() { return null; } + public ZoneId getZone() { return ZoneOffset.UTC; } @Override - public Clock withZone(ZoneId zone) { return null; } + public Clock withZone(ZoneId zone) { return this; } @Override public long millis() { return instant().toEpochMilli(); } -- cgit v1.2.3