public class ApplicationClock extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DATE_FORMAT |
| Constructor and Description |
|---|
ApplicationClock() |
| Modifier and Type | Method and Description |
|---|---|
static Clock |
getClock()
Returns the configured application Clock instance.
|
static void |
reset()
Resets the application clock to the default.
|
static void |
setClock(Clock clock)
Sets the application clock.
|
static void |
setIso(Instant time)
Creates a fixed Clock.
|
static void |
setLocal(String time)
Creates a fixed Clock with the input format "yyyy-MM-dd HH:mm:ss" using the local (systemDefault) timezone.
|
static void |
setUtc(Date time)
Creates a fixed Clock.
|
static void |
setUtc(String time)
Creates a fixed Clock with the input format "yyyy-MM-dd'T'HH:mm:ss'Z'" using UTC as timezone.
|
public static final String DATE_FORMAT
public static Clock getClock()
public static void setClock(Clock clock)
public static void reset()
public static void setIso(Instant time)
public static void setUtc(Date time)
public static void setUtc(String time)
public static void setLocal(String time)
Copyright © 2017. All rights reserved.