java.util.SimpleTimeZone.getOffset(long date) 方法


java.util.SimpleTimeZone.getOffset(long date) 方法

package com.codingdict;

import java.util.*;

public class SimpleTimeZoneDemo {
   public static void main( String args[] ) {

      // create simple time zone object
      SimpleTimeZone stobj = new SimpleTimeZone(720,"US");

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

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