<dependency>
<groupId>io.timely</groupId>
<artifactId>timely-core</artifactId>
<version>1.0.0</version>
</dependency>
long timestamp = 1631913600000L; // 2021-09-18 00:00:00 UTC
Date date = Timely.Timestamp.toDate(timestamp);
Date date = new Date();
long timestamp = Timely.Timestamp.fromDate(date);
long timestamp = 1631913600000L; // 2021-09-18 00:00:00 UTC
String strDate = Timely.Timestamp.toString(timestamp);
long timestamp1 = 1631913600000L; // 2021-09-18 00:00:00 UTC
long timestamp2 = 1632000000000L; // 2021-09-19 00:00:00 UTC
long diffSeconds = Timely.Timestamp.diff(timestamp1, timestamp2);