Java Calendar getTimeZone() MethodThe getTimeZone() method of java.util.Calendar class gets the TimeZone of calendar object and returns a TimeZone object. SyntaxParameterNo parameter is passed. ReturnsReturns the TimeZone object. ThrowsDoes not throw an exception. Example 1Test it NowOutput: TimeZone:Pacific Standard Time Time Zone after changing to GMT:Greenwich Mean Time Example 2Test it NowOutput: Display Name of Current TimeZone Pacific Standard Time
Next TopicJava Calendar Class
|