Interface TimeService
-
public interface TimeServiceThis service allows Features to get time information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetCurrentTime()Returns the current time.intgetCurrentZoneOffset()Returns the current zone offset.
-
-
-
Method Detail
-
getCurrentTime
long getCurrentTime()
Returns the current time.- Returns:
- the current time (in milliseconds, measured from the Java Epoch).
-
getCurrentZoneOffset
int getCurrentZoneOffset()
Returns the current zone offset.The zone offset can change not only when the user configures his time zone, but also at any moment depending on the time zone rules. For example, the zone offset changes when switching to summer time or winter time if the configured time zone applies DST.
- Returns:
- the current zone offset (in seconds, from -64800 to 64800).
-
-