// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;

public class DT8 {
    public static void main(String[] args) {
        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("HH:mm");
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime nowplus2 = now.plusHours(2)  ;
        System.out.println(dtf.format(now));
        System.out.println(dtf.format(nowplus2));
        ZonedDateTime nowgmt = now.atZone(ZoneId.of("GMT"));
        ZonedDateTime nowplus2gmt = nowplus2.atZone(ZoneId.of("GMT"));
        System.out.println(dtf.format(nowgmt));
        System.out.println(dtf.format(nowplus2gmt));
    }
}
