aboutsummaryrefslogtreecommitdiffstats
path: root/testutil/src
diff options
context:
space:
mode:
authorØyvind Grønnesby <oyving@verizonmedia.com>2021-11-03 12:39:12 +0100
committerØyvind Grønnesby <oyving@verizonmedia.com>2021-11-03 12:39:12 +0100
commit41bf6baf7256cfa2619457bb47a935b61d0e7a7b (patch)
tree5151e9a6a5c1d8b1ccba6cb02abd344a4b7763da /testutil/src
parent8cbeb2b57269e64ea05ccf9f1044f57843a6e80c (diff)
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.
Diffstat (limited to 'testutil/src')
-rw-r--r--testutil/src/main/java/com/yahoo/test/ManualClock.java4
1 files changed, 2 insertions, 2 deletions
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(); }