Example usage for java.time OffsetTime truncatedTo

List of usage examples for java.time OffsetTime truncatedTo

Introduction

In this page you can find the example usage for java.time OffsetTime truncatedTo.

Prototype

public OffsetTime truncatedTo(TemporalUnit unit) 

Source Link

Document

Returns a copy of this OffsetTime with the time truncated.

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetTime m = OffsetTime.now();
    OffsetTime n = m.truncatedTo(ChronoUnit.DAYS);
    System.out.println(n);/*from   w w w  .ja  v a2 s. co m*/

}