Java examples for java.time:Timezone
java.util.Date to Local Date Using Default Zone
//package com.java2s; import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; public class Main { public static LocalDate toLocalDateUsingDefaultZone(Date dateTime) { return LocalDate.from(dateTime.toInstant().atZone( ZoneId.systemDefault())); }//from ww w. ja v a 2 s. co m }