convert localdatetime to long to java code example
Example: java convert LocalDateTime to long
public long createTimestamp() {
ZoneId zoneId = ZoneId.systemDefault();
return LocalDateTime.now().atZone(zoneId).toEpochSecond();
}
public long createTimestamp() {
ZoneId zoneId = ZoneId.systemDefault();
return LocalDateTime.now().atZone(zoneId).toEpochSecond();
}