Last active
April 13, 2020 10:26
-
-
Save L-Soft/250eb2eb6f78a63f530ca8d87559df05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.OffsetDateTime; | |
import java.time.ZoneOffset; | |
public class CodeTest { | |
public static void main(String[] args) { | |
// https://currentmillis.com | |
// https://perfectacle.github.io/2018/09/26/java8-date-time/ | |
OffsetDateTime offsetDateTime = OffsetDateTime.of(2019, 12, 2, 0, 0, 0, 0, ZoneOffset.UTC); | |
System.out.println(offsetDateTime.toInstant().toEpochMilli()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment