fork download
  1. import java.time.*;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Clock c = Clock.fixed(Instant.parse("2018-04-29T10:15:30.00Z"), ZoneId.of("Europe/Berlin"));
  6. LocalDateTime ldt = Instant.now(c).atZone(ZoneOffset.UTC).toLocalDateTime();
  7. System.out.println(ldt);
  8. }
  9. }
Success #stdin #stdout 0.16s 44396KB
stdin
Standard input is empty
stdout
2018-04-29T10:15:30