Here you can find the source of parseTime(String time)
public static long parseTime(String time)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; public class Main { public static final String TIME_FORMAT = "HH:mm"; public static long parseTime(String time) { return parse(TIME_FORMAT, time); }/*from w w w . j a v a 2 s.com*/ public static long parse(String pattern, String date) { final SimpleDateFormat sdf = new SimpleDateFormat(pattern); try { return sdf.parse(date).getTime(); } catch (ParseException e) { e.printStackTrace(); } return 0; } }