Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.time.LocalTime;
import java.time.ZoneId;

public class Main {
    public static void main(String... args) {
        ZoneId zone1 = ZoneId.of("Europe/Berlin");
        ZoneId zone2 = ZoneId.of("Brazil/East");

        LocalTime now1 = LocalTime.now(zone1);
        LocalTime now2 = LocalTime.now(zone2);

        System.out.println(now1);
        System.out.println(now2);

    }
}