title: convert from millis since Epoch to LocalDateTime in Java 10 vs Java 8
body: <p>I have an application where I use milliseconds since Epoch to convert to LocalDateTime and back, the application was working well on Java 8 but I tried to update to Java 10 and found the following issue</p>
  
  <p>This is the output in Java 8</p>
  
  <pre><code> ✘ magg@MacBook-Pro-de-Miguel  ~/Desktop/CODE  java TimeTest
  2018-09-06T20:13:30.253
  1536290010253
  2018-09-06T20:13:30.253
   ✘ magg@MacBook-Pro-de-Miguel  ~/Desktop/CODE  java -version
  java version "1.8.0_181"
  Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
  Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
  </code></pre>
  
  <p>This is the output in Java 10, if you see the format is 6 digits long at the end not three like in Java 8 and this breaks the conversion from milliseconds since Epoch to LocalDateTime</p>
  
  <pre><code>✘ magg@MacBook-Pro-de-Miguel  ~/Desktop/CODE  java TimeTest
  2018-09-06T20:13:18.568414
  1536289998568
  2018-09-06T20:13:18.568
   ✘ magg@MacBook-Pro-de-Miguel  ~/Desktop/CODE  java -version
  java version "10.0.2" 2018-07-17
  Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
  Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
  </code></pre>
  
  <p>Here is the source code</p>
  
  <pre><code>public class TimeTest{
  
  
  public static void main(String[] args)
  {
  
  TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles"));
  
  LocalDateTime issueTime = LocalDateTime.now();
  
  System.out.println(issueTime.toString());
  
  ZonedDateTime zdt = issueTime.atZone(TimeZone.getDefault().toZoneId());
  long timeInMillis = zdt.toInstant().toEpochMilli();
  System.out.println(timeInMillis );
  
  LocalDateTime date = LocalDateTime.ofInstant(Instant.ofEpochMilli(timeInMillis), TimeZone.getDefault().toZoneId());
  
  System.out.println(date.toString());
  }
  }
  </code></pre>
  
  <p>How can I fix this in Java 10?</p>