Class TimeSourceImpl

java.lang.Object
io.jmix.core.impl.TimeSourceImpl
All Implemented Interfaces:
TimeSource

@Component("core_TimeSource") public class TimeSourceImpl extends Object implements TimeSource
Standard implementation of TimeSource interface.
  • Constructor Details

    • TimeSourceImpl

      public TimeSourceImpl()
  • Method Details

    • currentTimestamp

      public Date currentTimestamp()
      Description copied from interface: TimeSource
      Return current timestamp as Date instance.
      Specified by:
      currentTimestamp in interface TimeSource
      Returns:
      current timestamp
    • currentTimeMillis

      public long currentTimeMillis()
      Description copied from interface: TimeSource
      Return current timestamp in milliseconds.
      Specified by:
      currentTimeMillis in interface TimeSource
      Returns:
      number of milliseconds since 1970-01-01 00:00
    • now

      public ZonedDateTime now()
      Description copied from interface: TimeSource
      Return ZonedDateTime for current timestamp.
      Specified by:
      now in interface TimeSource
      Returns:
      ZonedDateTime