Here you can find the source of parseBuildTimestamp(String buildTimestamp)
public static ZonedDateTime parseBuildTimestamp(String buildTimestamp)
//package com.java2s; //License from project: Creative Commons License import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.Date; public class Main { public static ZonedDateTime parseBuildTimestamp(String buildTimestamp) { return parseToZonedDateTime(buildTimestamp + " +0000", "yyyy-MM-dd HH:mm Z"); }// w w w . ja v a2s.c om public static ZonedDateTime parseToZonedDateTime(String dateString, String pattern) { return ZonedDateTime.parse(dateString, DateTimeFormatter.ofPattern(pattern)); } public static ZonedDateTime parseToZonedDateTime(Date date) { return date.toInstant().atZone(getZoneId()); } private static ZoneId getZoneId() { return ZoneId.systemDefault(); } }