getRawOffset(): This method is available in java.util.TimeZone class of Java.
Syntax:
int java.util.TimeZone.getRawOffset()
This method returns the amount of time in milliseconds to add to UTC to get standard time in this time zone.
Parameters: NA
Returns: the amount of raw offset time in milliseconds to add to UTC.
Exceptions: NA
Approach
Java
import java.util.SimpleTimeZone;import java.util.TimeZone;public class TimeZonegetRawOffset {public static void main(String[] args) {TimeZone timeZone = new SimpleTimeZone(100, "US");System.out.println(timeZone.getRawOffset());}}
Output:
100
No comments:
Post a Comment