I would really need an alternative to SimpleDateFormat, I am converting many-many Strig dates(>100k) from JST to GMT. The problem I have is that my code generates way to many char[] , as I noticed while profiling. For 150k dates, I get constant 150MB of memory used, and its not really an option. Thanks.
SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
sdf.setTimeZone(tz);
try {
Date theResult = sdf.parse(dateToConvert);
SimpleDateFormat rdf = new SimpleDateFormat(resultDateFormat);
rdf.setTimeZone(resultTz);
return rdf.format(theResult);
} catch (ParseException e) {
e.printStackTrace();
}
I can not use Joda time, so that is not an option for me. :(