土耳其的Java时区(拒绝夏令时)

编程入门 行业动态 更新时间:2024-10-27 00:36:00
本文介绍了土耳其的Java时区(拒绝夏令时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

土耳其最近决定(2016年9月6日)永久停留在夏令时(DST)。此行为取消了之前安排在2016年10月30日04:00:00的夏令时结束。时钟没有改变。

Turkey decided recently (September 6, 2016 ) to permanently stay in Daylight Saving Time (DST). This act canceled the ending of DST previously scheduled for October 30, 2016, 04:00:00. Clocks were not changed.

土耳其介于 +2和+3 utc 之间,所以它现在会留在+ 3。 在这里你可以看到

Turkey is between +2 and +3 utc, so now it will stay in +3. Here you can see

www.timeanddate/time/change/turkey/ankara?year=2016

...维基百科页面, 土耳其时间 ,以及此Hurriyet每日新闻article, 土耳其全年实施夏令时 。

…and in the Wikipedia page, Time in Turkey, and this Hurriyet Daily News article, Turkey to implement daylight savings time year-round.

此处他们讨论但我在Spring Boot中有一个应用程序。

Here they discuss but I have an application in Spring Boot.

Android TimeZone土耳其GMT

cmntWrapper.setCreatedAtString(cmnt.getCreatedAt(). now(ZoneId.of(Constants.TURKEY_ZONE)). format(DateTimeFormatter.ofPattern(Constants.DATE_TIME_FORMAT)));

这就是我约会的日期。

现在显示小时 13.50 但现在 14.50 。因为我们在+3。

This shows the hour 13.50 now but now it is 14.50. Because we are in +3.

我该怎么办?

我不想使用utc +3因为他们可以说明年让我们再次使用+ 2- + 3切换到夏令时的概念。所以我不敢承担风险。

I dont want to use utc +3 because they can say next year, "lets again use to +2-+3 switching to daylight saving concept". So i cant risk.

我不能在未来几周更改代码,几周后它将保持永久性。

I cant change code in future weeks, it will stay permanent after a few weeks.

你对永久性的建议是什么?

What do you suggest for permanent?

以及我如何制作java?因为对于我的测试linux机器,请看这个

and also how can i make java? because for my test linux machine , see this please

puapp @ PU-APP-01:〜$ java version 程序'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:~$ java version The program 'java' can be found in the following packages: * default-jre * gcj-4.8-jre-headless * openjdk-7-jre-headless * gcj-4.6-jre-headless * openjdk-6-jre-headless Try: 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 puapp@PU-APP-01:~$

puapp @ PU-APP-01:〜$ whereis java java:/ usr / share / java

puapp@PU-APP-01:~$ whereis java java: /usr/share/java

但是在本地我有java。

But in local i have java.

vegan @ vegan:〜$ java -version java version1.8.0_111 Java(TM)SE运行时环境(版本1.8.0_111) -b14) Java HotSpot(TM)64位服务器VM(版本25.111-b14,混合模式) vegan @ vegan:〜$

vegan@vegan:~$ java -version java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode) vegan@vegan:~$

但是当地并不重要。那个linux服务器很重要。

but local is not important. that linux server is immportant.

我们的主机上有java

and for our main machine, there is 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。如果没有包含,正确的,官方的方法是使用时区更新工具。

The prefered way to do this would be to update the JDK/JRE, if it includes the new timezone information. If it is not included, the correct, and official way to do this, should be to update the Timezone information using the Timezone Updater Tool.

提供TZUpdater工具允许您使用更新的时区数据更新已安装的Java Development Kit(JDK)和Java Runtime Environment(JRE)软件,以适应不同国家/地区的夏令时(DST)更改。 Oracle依赖于通过IANA时区数据库公开提供的时区数据。

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建议您使用最新的Oracle Java SE平台JDK或JRE更新版本作为首选方式提供时区数据更新和其他产品改进,例如安全修复程序。要查看哪个JDK或JRE更新版本包含您的语言环境的更新时区数据,请参阅JRE软件中的时区数据版本。但是,如果您无法使用Oracle最新的JDK或JRE更新版本,或者最新版本的时区数据不是最新版本,则TZUpdater工具提供了更新时区数据的方法,同时保持其他系统配置和依赖关系不变。

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.

可以在官方Java SE下载站点(在其他资源部分下)。

有关您的具体案例的信息,请访问此处(您还可以看到该信息在JRE版本中不可用):

Information about your particular case can be found here (where you can also see that the information is not available in a JRE release):

土耳其从EET / EEST切换(+ 02 / + 03)永久+03,生效2016-09-07。 新闰秒2016-12-31 23:59:60 UTC根据IERS Bulletin C 52。

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中解释:

How to use the tool is explained in the doucentation:

TZUpdater工具修改用于执行该工具的JDK / JRE软件实例。每次执行都会修改JDK / JRE软件的单个映像。要将该工具管理到JDK / JRE软件的多个实例,请参阅Systemwide Usage部分。

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,其中应包括土耳其夏令时的更改。

For example, the below command would update the JRE with the latest information, where the changes in Turkey daylight saving should be included.

java -jar tzupdater.jar -l www.iana/time-zones/repository /tzdata-latest.tar.gz

请注意,有当前自2016g发布以来的已知问题 :

由于IANA维护的tzdata包中的格式更改,TZUpdater工具在解析tzdata2016.tar时无法确定tzdata版本.gz资源包。

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软件包。修复此问题后,将删除此部分答案。

Follow the steps from the below link in order to be able to use the latest tzdata bundle from IANA. When this is fixed, this section of the answer will be removed.

更多推荐

土耳其的Java时区(拒绝夏令时)

本文发布于:2023-10-28 08:17:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1536067.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:土耳其   夏令时   时区   Java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!