java 8 convert localdatetime to long 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();
}