I have an issue here. I have gone through all the related post but wasnt able to get rid of this situation. I am trying to convert a US/Pacific date from string to a date object:
SimpleDateFormat df = new SimpleDateFormat("dd-MM-yy HH:mm:SS a z");
df.setTimeZone(TimeZoneUtil.getTimeZone("US/Pacific"));
String userTime = df.format(date);// User Time - Returns correct US/Pacific time
Date userDate = df.parse(userTime); // Always returns the date in EDT
I understand that Date does not have its own format but I am completely foxed to see parse method returning the EDT time.
My question is that I want to convert userTime string to Date object in the same format/time zone that I have set to the SimpleDateFormat. I need help guys.. waiting desperately. Thanks in advance