[tz] Java Installed TZ DB Release Reporting (was: Welcome to the "tz" mailing list)

Brian Inglis Brian.Inglis at SystematicSw.ab.ca
Fri May 22 17:46:16 UTC 2020


On 2020-05-22 10:10, Sundar Sarma wrote:
> we have used this code to get the IANA tz version.
> 
> public static String getTimezoneDatabaseIANAVersion() {
> 
>         File readmeFile = new File(ZONEINFO_PATH, "README");
>         File alternativeReadmeFile = new File(ZONEINFO_PATH, "README.txt");
> 
>         if (!readmeFile.exists()) {
>             readmeFile = alternativeReadmeFile;
>         }
> 
> out read me.txt file contain
> 
> generated by Gradle
> Based on http://www.iana.org/time-zones/repository/releases/tzdata2020a.tar.gz
> 
> means we are using correct tzdata2020a.
> 
> But still why there is issue? Something wrong with tz db??

Just because there is a file present on your system does not mean that the TZ DB
data has been successfully or correctly installed in the JVM you are running,
unless that data is known to be directly used by your JVM as TZ data.

Please consider using the suggested Java statement or command that directly
queries your JVM:

System.out.println(java.time.zone.ZoneRulesProvider.getVersions("UTC").keySet());

*OR*

$ jshell <<<
'System.out.println(java.time.zone.ZoneRulesProvider.getVersions("UTC").keySet());'

*OR*

$ grep -ao '^...TZDB....[12][90][0-9][0-9][a-z]' /usr/lib/jvm/*/lib/tzdb.dat

*OR*

equivalent if you are running other JVMs;
you also need to follow up with your Java, JVM, workstation or server support
staff to get TZ DB updates successfully and correctly downloaded and installed
in the JVMs you and others are running on a regular basis.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in IEC units and prefixes, physical quantities in SI.]


More information about the tz mailing list