getRawOffset(): This method is available in java.util.SimpleTimeZone class of Java.
Syntax:
int java.util.SimpleTimeZone.getRawOffset()
This method gets the GMT offset for this time zone.
Parameters: NA
Returns: the GMT offset value in milliseconds.
Exceptions: NA
Approach
Java
import java.util.SimpleTimeZone;public class SimpleTimeZonegetRawOffset {public static void main(String[] args) {SimpleTimeZone simpleTimeZone =new SimpleTimeZone(100, "India");System.out.println(simpleTimeZone.getRawOffset());}}
Output:
100
No comments:
Post a Comment