mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +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
|
@ -38,7 +38,6 @@ import java.io.InputStream;
|
|||
import javax.inject.Inject;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/**
|
||||
* Utility functions for escrow file import.
|
||||
|
@ -134,7 +133,7 @@ public class RdeImportUtils {
|
|||
String tld = parser.getHeader().getTld();
|
||||
try {
|
||||
Registry registry = Registry.get(tld);
|
||||
TldState currentState = registry.getTldState(DateTime.now());
|
||||
TldState currentState = registry.getTldState(clock.nowUtc());
|
||||
checkArgument(
|
||||
currentState == TldState.PREDELEGATION,
|
||||
String.format("Tld '%s' is in state %s and cannot be imported", tld, currentState));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue