Home » Tip Bank » Java » Classes
  • Comment on this Article
Language: Java
Expertise: Intermediate
May 28, 2019
  • facebook
  • twitter
  • in
  • Email

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Watch

Get the UTC Machine Time in Java

Beginning with JDK 8, the machine UTC timestamp with nanoseconds precision can be obtained via the java.time.Instant class as below:

// e.g., 2019-02-26T15:28:21.051163100Z
Instant now = Instant.now(); 
Octavia Anghel
 
Submit a Tip
Browse "Java" Tips
Browse All Tips
codeschool.com
htmlandcssbook.com