Here you can find the source of parseDIGTime(String timestr)
public static long parseDIGTime(String timestr)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static long parseDIGTime(String timestr) { long timeIns = 0; DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); try {//from w w w.j a va 2 s .co m Date date = (Date) formatter.parse(timestr); timeIns = date.getTime() / 1000; } catch (Exception e) { e.printStackTrace(); } return timeIns; } }