title: Convert java.time classes from java 8 to java 5
body: <p>What do I do to use this lines of code with Java 5, as this code runs with Java 6 and 7 using threetenbp and runs on Java 8 directly:</p>
  
  <pre><code>// start date (set the time to start of day)
  ZonedDateTime from = LocalDate.parse("2017-07-05").atStartOfDay(ZoneOffset.UTC);
  // end date (set the time to 11 PM)
  ZonedDateTime to = LocalDate.parse("2017-07-08").atTime(23, 0).atZone(ZoneOffset.UTC);
  
  // get start and end timestamps
  long start = from.toInstant().truncatedTo(ChronoUnit.MINUTES).toEpochMilli() / 1000;
  long end = to.toInstant().truncatedTo(ChronoUnit.MINUTES).toEpochMilli() / 1000;
  </code></pre>