Instead of java.time (System.out.println(java.time.z one.ZoneRulesProvider.getVersions("UTC").keySet());)) ) I want the above code in joda.time. Could you please help me?? I didn't get ZoneRulesProvider.getVersions in joda.time.. On Fri, 22 May 2020, 23:16 Brian Inglis, <Brian.Inglis@systematicsw.ab.ca> wrote:
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.]