I am looking for the code that displays list of countries/regions in android and by selecting a specific country/region, it displays the time zone of it. for example when i choose "central America" as country/region then it should displays "UTC-06:00" as Time Zone. so i want to know if Android provide this functionality by default or i am to list down all countries/regions in an array and Time zones in another array and make the logic.
i have used the following code but no success
DateFormat format = new SimpleDateFormat("MMMMM d, yyyy, h:mm a");
TimeZone utc = TimeZone.getTimeZone("Central America");
System.out.println(utc.getID());
Log.d("Time", utc.getID());
GregorianCalendar gc = new GregorianCalendar(utc);
Date now = gc.getTime();
System.out.println(format.format(now));
Log.d("Time", format.format(now));