Raj Raj - 1 year ago 38
Java Question

How to get local time of different timezones?

I want to get Local time of different timezones using Java code. Based on the time zone passed to the function I need that timezone local time. How to achieve this using Java code?

java.util.TimeZone tz = java.util.TimeZone.getTimeZone("GMT+1");
java.util.Calendar c = java.util.Calendar.getInstance(tz);