Package google.registry.util
Interface Clock
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
SystemClock
A clock that tells the current time in milliseconds or nanoseconds.
Clocks are technically serializable because they are either a stateless wrapper around the system clock, or for testing, are just a wrapper around a DateTime. This means that if you serialize a clock and deserialize it elsewhere, you won't necessarily get the same time or time zone -- what you will get is a functioning clock.
-
Method Summary
Modifier and TypeMethodDescriptionorg.joda.time.DateTime
nowUtc()
Returns current time in UTC timezone.
-
Method Details
-
nowUtc
org.joda.time.DateTime nowUtc()Returns current time in UTC timezone.
-