<div dir="auto">Instead of java.time (<span style="font-family:sans-serif;font-size:12.8px">System.out.println(java.time.z</span><span style="font-family:sans-serif;font-size:12.8px">one.ZoneRulesProvider.getVersi</span><span style="font-family:sans-serif;font-size:12.8px">ons("UTC").keySet());)) )</span><div dir="auto"><font face="sans-serif"><span style="font-size:12.8px"><br></span></font></div><div dir="auto"><font face="sans-serif"><span style="font-size:12.8px">I want the above code in joda.time. Could you please help me?? <br></span></font><div dir="auto"><span style="font-family:sans-serif;font-size:12.8px">I didn't get ZoneRulesProvider.getVersions in joda.time.. </span></div><div dir="auto"><span style="font-family:sans-serif;font-size:12.8px"><br></span></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 22 May 2020, 23:16 Brian Inglis, <<a href="mailto:Brian.Inglis@systematicsw.ab.ca">Brian.Inglis@systematicsw.ab.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2020-05-22 10:10, Sundar Sarma wrote:<br>
> we have used this code to get the IANA tz version.<br>
> <br>
> public static String getTimezoneDatabaseIANAVersion() {<br>
> <br>
>         File readmeFile = new File(ZONEINFO_PATH, "README");<br>
>         File alternativeReadmeFile = new File(ZONEINFO_PATH, "README.txt");<br>
> <br>
>         if (!readmeFile.exists()) {<br>
>             readmeFile = alternativeReadmeFile;<br>
>         }<br>
> <br>
> out read me.txt file contain<br>
> <br>
> generated by Gradle<br>
> Based on <a href="http://www.iana.org/time-zones/repository/releases/tzdata2020a.tar.gz" rel="noreferrer noreferrer" target="_blank">http://www.iana.org/time-zones/repository/releases/tzdata2020a.tar.gz</a><br>
> <br>
> means we are using correct tzdata2020a.<br>
> <br>
> But still why there is issue? Something wrong with tz db??<br>
<br>
Just because there is a file present on your system does not mean that the TZ DB<br>
data has been successfully or correctly installed in the JVM you are running,<br>
unless that data is known to be directly used by your JVM as TZ data.<br>
<br>
Please consider using the suggested Java statement or command that directly<br>
queries your JVM:<br>
<br>
System.out.println(java.time.zone.ZoneRulesProvider.getVersions("UTC").keySet());<br>
<br>
*OR*<br>
<br>
$ jshell <<<<br>
'System.out.println(java.time.zone.ZoneRulesProvider.getVersions("UTC").keySet());'<br>
<br>
*OR*<br>
<br>
$ grep -ao '^...TZDB....[12][90][0-9][0-9][a-z]' /usr/lib/jvm/*/lib/tzdb.dat<br>
<br>
*OR*<br>
<br>
equivalent if you are running other JVMs;<br>
you also need to follow up with your Java, JVM, workstation or server support<br>
staff to get TZ DB updates successfully and correctly downloaded and installed<br>
in the JVMs you and others are running on a regular basis.<br>
<br>
-- <br>
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada<br>
<br>
This email may be disturbing to some readers as it contains<br>
too much technical detail. Reader discretion is advised.<br>
[Data in IEC units and prefixes, physical quantities in SI.]<br>
</blockquote></div>