TimeZone getRawOffset() Method in Java with Examples
The getRawOffset() method of TimeZone class in Java is used to know the amount of time in milliseconds needed to be added to the UTC to get the standard time in this TimeZone.
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.
public abstract int getRawOffset()
Parameters: The method does not take any parameters.
Return Value: The method returns in milliseconds the amount of time needed to be added to the UTC to get the standard time in this TimeZone.
Below programs illustrate the working of getRawOffset() Method of TimeZone:
The rawOffset time is: -39600000
The rawOffset time is: 3600000