//服务器返回的时间 和当前的时间
@SuppressLint("SimpleDateFormat")
public static int TimeMillis(String args) throws ParseException{
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = (Date) sdf.parse(args);
date.getTime();//服务器返回的时间
sdf.format(new Date());//当前时间
return (int)(new Date().getTime()-date.getTime())/1000;
}