Java Date Time Java Java API
java.time.OffsetTime
public int getNano()
Returns the nano-of-second field from this OffsetTime instance.
package com.logicbig.example.offsettime;import java.time.OffsetTime;import java.time.ZoneOffset;public class GetNanoExample { public static void main(String... args) { OffsetTime d = OffsetTime.of(17, 40, 33, 20000, ZoneOffset.ofHours(-6)); System.out.println(d); int nano = d.getNano(); System.out.println(nano); }}
17:40:33.000020-06:0020000