Bug 199190 - [regression] java/openjdk7 does not use local timezone,while openjdk6 ok
Summary: [regression] java/openjdk7 does not use local timezone,while openjdk6 ok
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Greg Lewis
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-04-06 02:01 UTC by Jov
Modified: 2018-08-03 19:43 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jov 2015-04-06 02:01:23 UTC
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
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-01-12 21:52:22 UTC
Is this still relevant?
No feedback from maintainer!
Comment 2 Michael Osipov 2018-08-03 19:43:45 UTC
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