Thanks for your replies.
I checked for zones that Java SDK can understand as per Paul's guidance.
TimeZone.getAvailableIDs();
I found "Brazil/East" value is equivalent to my app's value, (GMT-03:00) Brazil Time (Brasilia).
When ran the below code:
package com.dates;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.TimeZone;
public class DateWitZoneSuffix {
static String sCurrDate = "Tue Jan 08 11:31:05 GMT 2013";
static DateFormat inputDateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy");
static String outputDateStr = "MM/dd/yyyy hh.mm.ss aaa z";
static DateFormat outputDateFormat = new SimpleDateFormat(outputDateStr);
@SuppressWarnings("rawtypes")
static Map zoneIds = new HashMap<String, String>();
@SuppressWarnings("unchecked")
public static void main(String[] args) throws ParseException {
Date inputDate = inputDateFormat.parse(sCurrDate);
Calendar cal = Calendar.getInstance();
//outputDateFormat.setTimeZone(TimeZone.getTimeZone("(GMT-03:00) Brazil Time (Brasilia)")); //(GMT+08:00) Western Australia Time (Perth)
zoneIds.put("(GMT-03:00) Brazil Time (Brasilia)", "Brazil/East");
outputDateFormat.setTimeZone(TimeZone.getTimeZone((String)zoneIds.get("(GMT-03:00) Brazil Time (Brasilia)"))); //(GMT+08:00) Western Australia Time (Perth)
cal.setTime(inputDate);
System.out.println(outputDateFormat.format(cal.getTime()));
}
}
// Got expected output
// 01/08/2013 09.31.05 AM BRST
Similarly do i need to find out 81 values for all zones that my app has that Java SDK can understand?
But how to determine if the time [Both past and present] was/is in daylight savings or not?