fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. import java.time.* ;
  8. import java.time.temporal.* ;
  9. import java.time.format.* ;
  10.  
  11.  
  12. /* Name of the class has to be "Main" only if the class is public. */
  13. class Ideone
  14. {
  15. public static void main (String[] args) throws java.lang.Exception
  16. {
  17.  
  18. Instant start = Instant.ofEpochMilli( 1_412_801_340_000L ); // 2014-10-08T20:49:00Z (not 10/8/14 4:49 PM in UTC time)
  19. Instant stop = Instant.ofEpochMilli( 1_412_808_540_000L ); // 2014-10-08T22:49:00Z (not 10/8/14 6:49 PM in UTC time)
  20. Instant test = Instant.ofEpochMilli( 1_447_195_740_000L ); // 2015-11-10T22:49:00Z (not 11/10/15 5:49 PM in UTC time)
  21.  
  22. System.out.println( "start.toString(): " + start );
  23. System.out.println( "stop.toString(): " + stop );
  24. System.out.println( "test.toString(): " + test );
  25.  
  26.  
  27. }
  28. }
Success #stdin #stdout 0.15s 4575232KB
stdin
Standard input is empty
stdout
start.toString(): 2014-10-08T20:49:00Z
stop.toString(): 2014-10-08T22:49:00Z
test.toString(): 2015-11-10T22:49:00Z