java - Java 8 的 Oracle JVM 中物理存储的 'tz' 时区数据库在哪里?

标签 java timezone

对于Oracle implementation of Java 8对于 Mac OS X(以及 Linux 和 Windows),tz time zone database 在哪里物理存储在 JDK/JRE 中?

我想找到实际的文件进行检查。

我在装有 El Capitan 的 Mac 上找到了 /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk 中的 JVM。但是我细读了它的内容并没有发现任何我能识别的“tz”文件。

最佳答案

在 Java 8 中,tz 文件是

jre/lib/tzdb.dat

另见 Timezone Updater Tool .这在某种程度上说,

For JDK 8 and later family versions:

  • Locate the 'tzdb.dat' file under the modified JAVAHOME/jre/lib directory. This is the newer data file.
  • Locate the 'tzdb.dat.<oldtzdataversion>'; file in the same JAVAHOME/jre/lib directory. This is the replaced, older data file.
  • Obtain the currently installed timezone data version from the command java -jar tzupdater.jar -V.
  • Rename the current 'tzdb.dat' file to something like 'tzdb.dat.<newtzdataversion>', or whatever version was given by the command in step 3. Ensure this name does not conflict with the older data files.
  • Rename the older data file to 'tzdb.dat'.
  • Validate the change in currently active timezone data by executing java -jar tzupdater.jar -V.
  • Restart applications on this JDK/JRE instance as desired.

关于java - Java 8 的 Oracle JVM 中物理存储的 'tz' 时区数据库在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37534584/

相关文章:

java - 服务中的定时器

java - 仅在Eclipse中将带有捆绑的外部jar添加到项目中

javascript - 如何将 JavaScript 日期转换为不同的时区

c# 时区问题

javascript - 是否有库或 Web 服务可以为我的 JavaScript 应用程序提供夏令时数据?

java - 如何在 Java 中转换 UTC 和本地时区

sql - 让 postgres 以 UTC 显示所有 TIMESTAMP WITH TIME ZONE 列

java - 关于 Java 中具体化泛型的任何消息?

java - 使用@JsonFormat时如何配置自定义错误消息?

java - 未使用的引用变量总是在 Java 中捕获