Java Date Time - 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.

/*from   w  ww  .j  ava2 s  .  com*/


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.