To calculate a time to another time zone, just
- get a timezone object for the new timezone
- register the timezone object to a formatter
- recalculate the time with the formatter to a string
code sample:
// formatter
DateFormat df = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
// local date
Date now = new Date();
// instanciate timezone
TimeZone timezone = TimeZone.getTimeZone(„Japan“);
// register on formatter
df.setTimeZone(timezone);
// recalculate
System.out.println(„Japan time is:“+df.format(now));