Example usage for java.util SimpleTimeZone getRawOffset

List of usage examples for java.util SimpleTimeZone getRawOffset

Introduction

In this page you can find the example usage for java.util SimpleTimeZone getRawOffset.

Prototype

public int getRawOffset() 

Source Link

Document

Gets the GMT offset for this time zone.

Usage

From source file:Main.java

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);
}

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(820, "GMT");

    // checking initial value     
    System.out.println("Initial raw offset: " + stobj.getRawOffset());

    // setting raw offset   
    stobj.setRawOffset(7200000);/*from  w  w  w  .  j  av a2  s .c  o m*/

    // checking the new value      
    System.out.println("Final raw offset value : " + stobj.getRawOffset());
}