public class SDKGlobalTime
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static int |
globalTimeOffset
globalTimeOffset is a time difference in seconds between the running JVM
and AWS.
|
Constructor and Description |
---|
SDKGlobalTime() |
Modifier and Type | Method and Description |
---|---|
static int |
getGlobalTimeOffset()
Gets the global time difference in seconds between the running JVM and
AWS.
|
static void |
setGlobalTimeOffset(int timeOffset)
Sets the global time difference in seconds between the running JVM and
AWS.
|
private static volatile int globalTimeOffset
Request
class but
those are used per request, whereas this variable will adjust clock skew
globally. Java SDK detects clock skew errors and adjusts global clock
skew automatically.public static void setGlobalTimeOffset(int timeOffset)
AmazonHttpClient
will start using this
value to generate timestamps.timeOffset
- the time difference in seconds between the running JVM and AWSpublic static int getGlobalTimeOffset()
Request#getTimeOffset()
if global time offset is
not set.