Java Date getTimezoneOffset() MethodThe getTimezoneOffset() method of Java Date class returns the offset which is measured in minutes for the local time zone which is relative to UTC, and that is appropriate for the time represented by this date object. This method is deprecated as of JDK version 1.1 and replaced by Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET)/(60*1000) Syntax:ParametersNA ReturnThe getTimezoneOffset() method returns the time-zone offset for the current time zone. Example 1Test it NowOutput: Current time-zone offset is : -330 Next TopicJava Util Date |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India