Java TimeZone.getRawOffset()

Syntax

TimeZone.getRawOffset() has the following syntax.

public abstract int getRawOffset()

Example

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


//  w  w w.j ava2s  . co m


import java.util.TimeZone;

public class Main {
   public static void main( String args[] ){
       
          
      TimeZone timezone = TimeZone.getDefault();
      
      // checking raw offset value     
      System.out.println("Raw Offset value:" + timezone.getRawOffset());
   }    
}

The code above generates the following result.