IBMとOracle/Sun JDK、java.util.Timzoneの動作が異なる、
IBMJDK1.5とSun/Oracle JDK 1.6
import java.util.*;
class TimeTest {
public static void main(String args[]){
long now = System.currentTimeMillis();
System.out.println("EST : " + TimeZone.getTimeZone("EST").getOffset(now));
System.out.println("US/Eastern : " + TimeZone.getTimeZone("US/Eastern").getOffset(now));
}
}
***IBM JVM ouput
EST : -14400000
US/Eastern : -14400000
Oracle JVM
EST : -18000000
US/Eastern : -14400000
IBM JDK
java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pxi32devifx-20090811 (SR10 +IZ56666+IZ56751))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20090707 (JIT enabled)
J9VM - 20090706_38445_lHdSMr
JIT - 20090623_1334_r8
GC - 200906_09)
JCL - 20090811
Oracle JDK
java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
更新、IBM JDK 6でテスト済み、これはoracle / sun java-versionjavaバージョン"1.6.0"Java(TM)SEランタイム環境(ビルドpxi3260sr6ifix-20091015_01(SR6 + 152211 + 155930 + 156106))の出力と一致しますIBM J9 VM(ビルド2.4、JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr6-20091001_43491(JIT対応、AOT有効)J9VM --20091001_043491 JIT --r9_20090902_1330ifx1 GC --20090817_AA)JCL --20091006_01
java TimeTest
EST : -18000000
US/Eastern : -14400000***