mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Fix all uses of DateTime.now() to use DateTimeZone.UTC
Almost all uses were in test classes, which I replaced with clock.nowUTC(). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=134993149
This commit is contained in:
parent
d853e59c7f
commit
b7a2c36be8
10 changed files with 26 additions and 24 deletions
|
@ -51,7 +51,7 @@ public class HostInfoFlowTest extends ResourceFlowTestCase<HostInfoFlow, HostRes
|
|||
new HostResource.Builder()
|
||||
.setFullyQualifiedHostName(getUniqueIdFromCommand())
|
||||
.setRepoId("1FF-FOOBAR")
|
||||
.setDeletionTime(active ? null : DateTime.now().minusDays(1))
|
||||
.setDeletionTime(active ? null : clock.nowUtc().minusDays(1))
|
||||
.setCurrentSponsorClientId("my sponsor")
|
||||
.setStatusValues(
|
||||
ImmutableSet.of(StatusValue.CLIENT_UPDATE_PROHIBITED))
|
||||
|
@ -66,7 +66,7 @@ public class HostInfoFlowTest extends ResourceFlowTestCase<HostInfoFlow, HostRes
|
|||
.setLastEppUpdateTime(DateTime.parse("1999-12-03T09:00:00.0Z"))
|
||||
.setLastTransferTime(DateTime.parse("2000-04-08T09:00:00.0Z"))
|
||||
.build());
|
||||
assertThat(isDeleted(host, DateTime.now())).isNotEqualTo(active);
|
||||
assertThat(isDeleted(host, clock.nowUtc())).isNotEqualTo(active);
|
||||
return host;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue