Java Date Time - Java SimpleTimeZone.getRawOffset()








Syntax

SimpleTimeZone.getRawOffset() has the following syntax.

public int getRawOffset()

Example

In the following code shows how to use SimpleTimeZone.getRawOffset() method.

//from w ww  .j a  va  2  s.com

import java.util.SimpleTimeZone;

public class Main {
   public static void main( String args[] ){
       
      SimpleTimeZone stobj = new SimpleTimeZone(720,"INDIA");
      
      // get raw offset
      int offset=stobj.getRawOffset(); 
      
      // check raw offset value       
      System.out.println("Raw Offset is : " + offset);
   }    
}

The code above generates the following result.