fork download
  1. import java.time.Instant;
  2. import java.time.ZoneId;
  3. import java.time.ZonedDateTime;
  4.  
  5. class Main {
  6. public static void main(String[] args) {
  7.  
  8. ZoneId zoneId = ZoneId.of("Europe/London");
  9.  
  10. ZonedDateTime zdt1 = Instant.ofEpochMilli(1282863600000L)
  11. .atZone(zoneId);
  12. ZonedDateTime zdt2 = Instant.ofEpochMilli(1321919999000L)
  13. .atZone(zoneId);
  14.  
  15. System.out.println(zdt1);
  16. System.out.println(zdt2);
  17. }
  18. }
Success #stdin #stdout 0.12s 59192KB
stdin
Standard input is empty
stdout
2010-08-27T00:00+01:00[Europe/London]
2011-11-21T23:59:59Z[Europe/London]