title: How to get milliseconds from LocalDateTime in Java 8
body: <p>I am wondering if there is a way to get current milliseconds since 1-1-1970 (epoch) using the new <code>LocalDate</code>, <code>LocalTime</code> or <code>LocalDateTime</code> classes of Java 8.</p>
  
  <p>The known way is below:  </p>
  
  <pre><code>long currentMilliseconds = new Date().getTime();
  </code></pre>
  
  <p>or</p>
  
  <pre><code>long currentMilliseconds = System.currentTimeMillis();
  </code></pre>