首页 / JAVA / 土耳其的Java时区(拒绝夏令时)
土耳其的Java时区(拒绝夏令时)
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了土耳其的Java时区(拒绝夏令时),小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3815字,纯文字阅读大概需要6分钟。
内容图文
![土耳其的Java时区(拒绝夏令时)](/upload/InfoBanner/zyjiaocheng/806/c1307a66646d41b78608fbb1ee15c73d.jpg)
土耳其最近决定(2016年9月6日)永久停留在Daylight Saving Time (DST).该法案取消了之前计划于2016年10月30日04:00:00结束的夏令时.时钟没有改变.
土耳其在2到3之间,所以现在它将保持在3.
在这里你可以看到
https://www.timeanddate.com/time/change/turkey/ankara?year=2016
……以及维基百科页面Time in Turkey以及此Hurriyet Daily News文章Turkey to implement daylight savings time year-round.
他们在这里讨论,但我在Spring Boot中有一个应用程序.
cmntWrapper.setCreatedAtString(cmnt.getCreatedAt().
now(ZoneId.of(Constants.TURKEY_ZONE)).
format(DateTimeFormatter.ofPattern(Constants.DATE_TIME_FORMAT)));
这是我约会的方式.
这显示现在是13.50小时,但现在是14.50.因为我们在3.
我能做什么?
我不想使用utc 3,因为他们可以说明年,“让我们再次使用2到3切换到夏令时概念”.所以我不敢冒险.
我不能在未来几周更改代码,它将在几周后保持永久性.
你对永久性的建议是什么?
还有我如何制作java?因为对于我的测试linux机器,请看这个
puapp @ PU-APP-01:?$java版
程序’java’可以在以下包中找到:
* default-jre
* gcj-4.8-jre-headless
* openjdk-7-jre-headless
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
尝试:sudo apt-get install
puapp @ PU-APP-01:?$
puapp @ PU-APP-01:?$whereis java
java:/usr/share / java
puapp @ PU-APP-01:?$
puapp @ PU-APP-01:?$whereis java
java:/usr/share / java
但在本地我有java.
素食者@素食主义者:?$java -version
java版“1.8.0_111”
Java(TM)SE运行时环境(版本1.8.0_111-b14)
Java HotSpot(TM)64位服务器VM(版本25.111-b14,混合模式)
素食主义者@素食主义者:?$
但是当地并不重要.那个linux服务器很重要.
而对于我们的主机,有java
produp@Produp-app-01:~$java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
produp@Produp-app-01:~$
解决方法:
如果它包含新的时区信息,那么首选的方法是更新JDK / JRE.如果不包括在内,正确的,官方的方法是使用Timezone Updater Tool更新时区信息.
The TZUpdater tool is provided to allow you to update installed Java Development Kit (JDK) and Java Runtime Environment (JRE) software with more recent timezone data, to accommodate daylight saving time (DST) changes in different countries. Oracle relies on the timezone data publicly available through IANA’s Time Zone Database.
Oracle recommends that you use the latest Oracle Java SE platform JDK or JRE update release as the preferred means of delivering both timezone data updates and other product improvements, such as security fixes. To see which JDK or JRE update release incorporates the updated timezone data for your locale, see Timezone Data Versions in the JRE Software. However, if you are unable to use Oracle’s latest JDK or JRE update release or if the timezone data on the latest release is not the most current one available, the TZUpdater tool provides a means of updating timezone data while leaving other system configuration and dependencies unchanged.
它可以在official Java SE download site(在附加资源部分下载)下载.
有关您的特定案例的信息可以在here找到(您还可以在JRE版本中看到该信息不可用):
Turkey switched from EET/EEST (+02/+03) to permanent +03, effective 2016-09-07.
New leap second 2016-12-31 23:59:60 UTC as per IERS Bulletin C 52.
如何使用该工具在doucentation中解释:
The TZUpdater tool modifies the JDK/JRE software instance that is used to execute the tool. A single image of the JDK/JRE software is modified per execution. To administer the tool to multiple instances of the JDK/JRE software, see the section Systemwide Usage.
例如,以下命令将使用最新信息更新JRE,其中应包括土耳其夏令时的更改.
java -jar tzupdater.jar -l 07003
请注意,目前有known issue since the 2016g release:
Due to formatting changes in the IANA-maintained tzdata bundle, the TZUpdater tool fails to determine the tzdata version when parsing the tzdata2016.tar.gz resource bundle.
请按照以下链接中的步骤操作,以便能够使用来自IANA的最新tzdata捆绑包.修复此问题后,将删除此部分答案.
内容总结
以上是互联网集市为您收集整理的土耳其的Java时区(拒绝夏令时)全部内容,希望文章能够帮你解决土耳其的Java时区(拒绝夏令时)所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。