Package io.jmix.core
Interface TimeSource
- All Known Implementing Classes:
- TimeSourceImpl
public interface TimeSource
Global time source interface. Must be used everywhere instead of 
new Date() and
 System.currentTimeMillis()- 
Method SummaryModifier and TypeMethodDescriptionlongReturn current timestamp in milliseconds.Return current timestamp as Date instance.now()ReturnZonedDateTimefor current timestamp.
- 
Method Details- 
currentTimestampDate currentTimestamp()Return current timestamp as Date instance.- Returns:
- current timestamp
 
- 
currentTimeMillislong currentTimeMillis()Return current timestamp in milliseconds.- Returns:
- number of milliseconds since 1970-01-01 00:00
 
- 
nowZonedDateTime now()ReturnZonedDateTimefor current timestamp.- Returns:
- ZonedDateTime
 
 
-