ZonedDateTime class provide toLocalTime() API to convert from ZonedDateTime to LocalTime in Java.
Convert ZonedDateTime to LocalTime Example
import java.time.LocalTime; import java.time.ZonedDateTime; /** * Program to demonstrate ZonedDateTime Class APIs. * @author javaguides.net * */ public class ZonedDateTimeExample { public static void main(String[] args) { getInstances(); } private static void getInstances() { // Current date time with zone ZonedDateTime dateTime = ZonedDateTime.now(); System.out.println(dateTime); // Get LocalTime LocalTime localTime = dateTime.toLocalTime(); System.out.println(localTime); } }
Output:
2019-06-16T13:38:59.061Z[Etc/UTC]
13:38:59.061
website designing services
ReplyDeleteSEO Service Consultant
Lyrics with music
we have provide the best fridge repair service.
ReplyDeleteWashing Machine Repair In Faridabad
LG Washing Machine Repair In Faridabad
Bosch Washing Machine Service Centre In Faridabad
Whirlpool Washing Machine Service Centre In Faridabad
Samsung Washing Machine Repair In Faridabad
Washing Machine Repair in Noida
godrej washing machine repair in noida
Samsung Washing Machine Repair in Noida
IFB washing Machine Repair in Noida
LG Washing Machine Repair in Noida
iso certification in noida
ReplyDeleteiso certification in delhi
ce certification in delhi
iso 14001 certification in delhi
iso 22000 certification cost
iso consultants in noida
iso 9001 certification in Delhi
iso 27001 certification services
ISO 9001 Certification in Noida
iso 22000 certification in Delhi