The getRawOffset() method of SimpleTimeZone class is used to get the GMT offset for this time zone.
Syntax:
public int getRawOffset()
Parameters: The function does not accepts any parameters.
Return Value: It returns the GMT offset value in milliseconds.
Exception: The function does not throws any exceptions.
Program below demonstrates the above mentioned function:
Program 1:
// program to demonstrate the// function java.util.SimpleTimeZone.getRawOffset()import java.util.*; public class GFG { public static void main(String[] args) { // create simple time zone object SimpleTimeZone obj = new SimpleTimeZone(580, "INDIA"); // get raw offset value and print System.out.println("Raw Offset is = " + obj.getRawOffset()); }} |
Raw Offset is = 580
Program 2:
// program to demonstrate the// function java.util.SimpleTimeZone.getRawOffset() import java.util.*; public class GFG { public static void main(String[] args) { // create simple time zone object SimpleTimeZone obj = new SimpleTimeZone(640, "INDIA"); // get raw offset value and print System.out.println("Raw Offset is = " + obj.getRawOffset()); }} |
Raw Offset is = 640

… [Trackback]
[…] Find More Information here on that Topic: geeksforgeeks.org/simpletimezone-getrawoffset-method-in-java-with-examples-2/ […]
… [Trackback]
[…] There you will find 99646 more Info on that Topic: geeksforgeeks.org/simpletimezone-getrawoffset-method-in-java-with-examples-2/ […]
… [Trackback]
[…] There you can find 73946 additional Information on that Topic: geeksforgeeks.org/simpletimezone-getrawoffset-method-in-java-with-examples-2/ […]
… [Trackback]
[…] Info on that Topic: geeksforgeeks.org/simpletimezone-getrawoffset-method-in-java-with-examples-2/ […]
… [Trackback]
[…] Here you will find 77854 additional Info to that Topic: geeksforgeeks.org/simpletimezone-getrawoffset-method-in-java-with-examples-2/ […]
… [Trackback]
[…] Here you can find 69828 more Information on that Topic: geeksforgeeks.org/simpletimezone-getrawoffset-method-in-java-with-examples-2/ […]