Example usage for java.time ZonedDateTime withNano

List of usage examples for java.time ZonedDateTime withNano

Introduction

In this page you can find the example usage for java.time ZonedDateTime withNano.

Prototype

public ZonedDateTime withNano(int nanoOfSecond) 

Source Link

Document

Returns a copy of this ZonedDateTime with the nano-of-second altered.

Usage

From source file:Main.java

public static void main(String[] args) {
    ZonedDateTime dateTime = ZonedDateTime.now();
    ZonedDateTime n = dateTime.withNano(1234);
    System.out.println(n);/*w  ww  .  j av  a 2s .com*/
}