Here you can find the source of createTimestampFormat()
private static SimpleDateFormat createTimestampFormat()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone; public class Main { private static SimpleDateFormat createTimestampFormat() { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("UTC")); // We use Proleptic Gregorian Calendar (i.e., Gregorian calendar extends // backwards to year one) for timestamp formating. calendar.setGregorianChange(new Date(Long.MIN_VALUE)); sdf.setCalendar(calendar);/*ww w . j a v a 2 s .c o m*/ return sdf; } }