dcsimg
 

Submitted by: M S Sridhar(sridhar.ms@gmail.com)

Tuesday Mar 20th 2018 by M S Sridhar

Language: Java, Expertise: Intermediate - This code will be of help if you are developing an application that is based on time zones.

In case you are developing an application that is based on time zones, this example will be of help.

Lisiting 1.

import java.util.TimeZone;

public class AvailableTimeZones
{
   
   public static void main(String args[])
   {
      AvailableTimeZones availableTimeZones = new AvailableTimeZones();
      availableTimeZones.proceed();
   }
   
   private void proceed()
   {
      TimeZone tz = TimeZone.getDefault();
      
      for (String availabeIDs : tz.getAvailableIDs())
      {
         System.out.println(availabeIDs);
      }
   }
}
Home
Mobile Site | Full Site
Copyright 2018 © QuinStreet Inc. All Rights Reserved