Here you can find the source of toString(Date date)
public final static String toString(Date date)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public final static String kSimpleDateFormat = "yyyy:DD:MM HH:mm:ss"; public final static String toString(Date date) { if (date == null) return ""; SimpleDateFormat lv_formatter; lv_formatter = new SimpleDateFormat(kSimpleDateFormat); lv_formatter.setTimeZone(TimeZone.getTimeZone("UTC")); return lv_formatter.format(date); }//w ww . ja va2s . c o m }