fork(2) download
  1. import java.time.ZoneId;
  2. import java.time.ZonedDateTime;
  3.  
  4. public class Main {
  5. public static void main(String[] args) {
  6. ZonedDateTime now = ZonedDateTime.now(ZoneId.of("Europe/Madrid"));
  7. System.out.println(now);
  8. }
  9. }
Success #stdin #stdout 0.1s 51580KB
stdin
Standard input is empty
stdout
2021-07-25T16:09:42.991126+02:00[Europe/Madrid]