if you want display or use current Date and Time of different Timezones, In your applications.
/*To get Current Date and Time of Different TimeZones. * In main block you can change the 'timeZone' name to get Date and Time of different zones. * */ import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone; public class Date_Time { public static Date getDate(Date currentDate, String timeZone) { Calendar gcal = new GregorianCalendar(TimeZone.getTimeZone(timeZone)); gcal.setTimeInMillis(currentDate.getTime()); Calendar cale = Calendar.getInstance(); cale.set(Calendar.YEAR, gcal.get(Calendar.YEAR)); cale.set(Calendar.MONTH, gcal.get(Calendar.MONTH)); cale.set(Calendar.DAY_OF_MONTH, gcal.get(Calendar.DAY_OF_MONTH)); cale.set(Calendar.HOUR_OF_DAY, gcal.get(Calendar.HOUR_OF_DAY)); cale.set(Calendar.MINUTE, gcal.get(Calendar.MINUTE)); cale.set(Calendar.SECOND, gcal.get(Calendar.SECOND)); cale.set(Calendar.MILLISECOND, gcal.get(Calendar.MILLISECOND)); return cale.getTime(); } public static void main(String Args[]) { Date now = new Date(); Calendar cal = Calendar.getInstance(); String timeZone = "Europe/Zurich"; System.out.println("System Date = "+now.toString()); System.out.println( timeZone+" = "+getDate(now, timeZone)); } }