Here you can find the source of serverTimestampToDate(String timestamp)
public static Date serverTimestampToDate(String timestamp)
//package com.java2s; //License from project: Open Source License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { private static final String SERVER_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; public static Date serverTimestampToDate(String timestamp) { try {//from w w w . j a va2s . c om return new SimpleDateFormat(SERVER_DATE_FORMAT, Locale.GERMANY) .parse(timestamp); } catch (ParseException e) { return new Date(); } } }