List of usage examples for java.time ZoneId of
public static ZoneId of(String zoneId)
From source file:sg.ncl.MainController.java
/** * Get simple ZonedDateTime from date string in the format 'YYYY-MM-DD'. * @param date date string to convert/*from w ww .j ava 2 s . c om*/ * @return ZonedDateTime of */ private ZonedDateTime convertToZonedDateTime(String date) { String[] result = date.split("-"); return ZonedDateTime.of(Integer.parseInt(result[0]), Integer.parseInt(result[1]), Integer.parseInt(result[2]), 0, 0, 0, 0, ZoneId.of("Asia/Singapore")); }