getDefault() - How to Initalize TimeZone object with the User's Preferred Time Zone

public static synchronized TimeZone getDefault () was added in API level 1
Returns the user's preferred time zone. This may have been overridden for this process with setDefault(TimeZone). Since the user's time zone changes dynamically, avoid caching this value. Instead, use this method to look it up for each use.

1. Declare TimeZone object
2. Add the line below to get the user's preferred time zone and save it to the TimeZime object named myTimeZone.
myTimeZone = TimeZone.getDefault();

3. Compile and run!

Next Recommended Article: getDisplayName() - How to get the Standard Time Zone, Long Form