Interface TimeService


  • public interface TimeService
    This service allows Features to get time information.
    • 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).