java.util.TimeZone.setID(String ID) 方法


java.util.TimeZone.setID(String ID) 方法

package com.codingdict;

import java.util.*;

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

      // create time zone object
      TimeZone tzone = TimeZone.getDefault();

      // set time zone ID
      tzone.setID("GMT+08:00");

      // checking time zone ID
      System.out.println("Time zone ID:" +tzone.getID());
   }    
}