I want to compare the time as below, the two result time values are created by Calendar with setting timezone to "PST". When I compare the two times, the result is always wrong.
Log time: Tue Oct 06 17:21:17 PDT 1970, while action time: Mon Oct 06 17:49:47 PDT 2014
Code is like below:
Calendar calendar = Calendar.getInstance();
DateFormat df = new SimpleDateFormat("MM-dd HH:mm:ss.SSS");
df.setTimeZone(TimeZone.getTimeZone("PST"));
s = newLine.substring(0, 17);
calendar.setTime(df.parse(s));