Here you can find the source of parseTimeStr(String timeStr)
public static Date parseTimeStr(String timeStr)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date parseTimeStr(String timeStr) { try {/*from ww w . j av a2 s . c om*/ return new SimpleDateFormat("yyyy MM dd HH:mm:ss").parse(timeStr); } catch (java.text.ParseException e) { throw new Error("wrong time format '" + timeStr + "'"); } } }