Here you can find the source of parseSpaydDate(String date, TimeZone tz)
public static Date parseSpaydDate(String date, TimeZone tz) throws ParseException
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { private static DateFormat dateFormat = null; public static Date parseSpaydDate(String date, TimeZone tz) throws ParseException { if (date == null) { return null; }/* ww w .ja v a 2s .c om*/ if (dateFormat == null) { dateFormat = new SimpleDateFormat("yyyyMMdd"); } if (tz != null) { dateFormat.setTimeZone(tz); } else { dateFormat.setTimeZone(TimeZone.getDefault()); } return dateFormat.parse(date); } }