after upgrade openjdk to 7,the default time zone of my java program do not use the system timezone and the default time zone became GMT instead of CST. the workaround is adding -Duser.timezone=Asia/Shanghai to the java lancher system info: [ ~]$ date 2015年 4月 6日 星期一 09时56分54秒 CST [ ~]$ locale LANG=zh_CN.UTF-8 LC_CTYPE="zh_CN.UTF-8" LC_COLLATE="zh_CN.UTF-8" LC_TIME="zh_CN.UTF-8" LC_NUMERIC="zh_CN.UTF-8" LC_MONETARY="zh_CN.UTF-8" LC_MESSAGES="zh_CN.UTF-8" LC_ALL= [ ~]$ java -version openjdk version "1.7.0_71" OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) [ ~]$ uname -a FreeBSD 10.1-RELEASE-p6 FreeBSD 10.1-RELEASE-p6 #0: Tue Feb 24 19:00:21 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
Is this still relevant? No feedback from maintainer!
Cannot reproduce: > $ less Toll.java > import java.util.Date; > > public class Toll { > public static void main(String... args) { > System.out.println(new Date()); > } > } > > $ JAVA_VERSION=1.7 java Toll > Fri Aug 03 21:40:11 CEST 2018 > $ date > Fr. 3 Aug. 2018 21:43:32 CEST
Freebsd 10.1 is gone , we have openjde7 version 7.40. This is overcome by events.