2023년 2월 3일 금요일

unix timestamp 13 digit compare

Intstant instant = Instant.ofEpochMilli(Long.parseLong(String timestamp));

Instant current = Instant.now();

instant.compareTo(current);


1 : t1 > t2

0 : t1 == t2

-1 : t1 < t2

댓글 없음:

댓글 쓰기