Working with Epoch time in Java using `java.time.Instant` (Modern Java 8+).
import java.time.Instant;
// Get current timestamp (seconds)
long now = Instant.now().getEpochSecond();import java.time.Instant;
// Parse ISO string to timestamp
long ts = Instant.parse("2024-01-01T00:00:00Z").getEpochSecond();import java.time.Instant;
// Timestamp to ISO String
String date = Instant.ofEpochSecond(1704067200L).toString();