Programming Language/Java & Scala
현재 Unixtime 가져오기 in 자바
AndersonChoi
2021. 5. 11. 10:05
Unixtime으로 현재시간을 가져오고 싶다면 아래와 같이 수행합니다.
System.currentTimeMillis()
Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds. See the description of the class Date for a discussion of slight discrepancies that may arise between "computer time" and coordinated universal time (UTC).
docs.oracle.com/javase/7/docs/api/java/lang/System.html#currentTimeMillis()
반응형