Example usage for java.util SimpleTimeZone getOffset

List of usage examples for java.util SimpleTimeZone getOffset

Introduction

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

Prototype

public int getOffset(long date) 

Source Link

Document

Returns the offset of this time zone from UTC at the given time.

Usage

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(720, "US");

    // get offset
    int offset = stobj.getOffset(Calendar.ZONE_OFFSET);

    // check offset value       
    System.out.println("Offset is : " + offset);
}