Example usage for java.time LocalTime now

List of usage examples for java.time LocalTime now

Introduction

In this page you can find the example usage for java.time LocalTime now.

Prototype

public static LocalTime now() 

Source Link

Document

Obtains the current time from the system clock in the default time-zone.

Usage

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();
    LocalTime s = l.minusHours(1);
    System.out.println(s);
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();

    System.out.println(l);
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();
    LocalTime s = l.with(LocalTime.NOON);
    System.out.println(s);
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();

    System.out.println(l.getSecond());
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();
    LocalTime s = l.minusNanos(1000);
    System.out.println(s);
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();

    System.out.println(l.isAfter(LocalTime.NOON));
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();

    System.out.println(l.toNanoOfDay());
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();
    LocalTime s = l.plusHours(14);
    System.out.println(s);
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();

    System.out.println(l.getHour());
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();
    LocalTime s = l.minusSeconds(1000);
    System.out.println(s);
}