Re: [tz] Welcome to the "tz" mailing list

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?? regards, sundar On Fri, May 22, 2020 at 9:12 PM Sundar Sarma <gkssarma59@gmail.com> wrote:
ZoneRulesProvider.getVersions( String zoneId ). which gives the version used by Java.
this above code gives the version used by java.
that is correct. Bu the above code is java.time
we are using joda.time in our application.
So could you please tell me that how to get the version used by java in joda time??
thanks, sundar
On Thu, May 21, 2020 at 6:39 PM Michael H Deckers < michael.h.deckers@googlemail.com> wrote:
On 2020-05-21 12:39, Sundar Sarma wrote:
Still i did not understand why this test case is failing with new 2020a tz.
The version of the IANA database installed in the operating system may well differ from the version used by Java.time. The latter can be determined with the method ZoneRulesProvider.getVersions( String zoneId ). which gives the version used by Java.
HTH.
Michael Deckers.

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.]

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.]

You can easily find out the proper places to ask these questions with a simple search for the project Joda-time! It is not on this list which does not support downstream products and derivatives, many of which should not be used in any production system, as they do nothing towards the essential task of updating the data, or providing clear and usable automated processes or documentation about maintaining the data, or providing processes or information about managing it. To find out if it is possible to query the time zone version under Joda time, raise a documentation issue at: https://github.com/JodaOrg/joda-time/issues and request they provide the sample code and add that to their documentation. To update Joda-time TZ data follow the build process at to rebuild the library: https://www.joda.org/joda-time/tz_update.html and raise an operational issue requesting an automated process be added to automatically download, apply, and update the library. As recommended you should have upgraded from this project to java.time when Java 8 was released: https://www.joda.org/joda-time/index.html -- 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.] On 2020-05-22 14:43, Sundar Sarma wrote:
Instead of java.time (System.out.println(java.time.zone.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 <mailto: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.]

The list of time-zone database versions can be seen in the release notes: https://www.joda.org/joda-time/changes-report.html Stephen On Fri, 22 May 2020 at 22:16, Brian Inglis <Brian.Inglis@systematicsw.ab.ca> wrote:
You can easily find out the proper places to ask these questions with a simple search for the project Joda-time!
It is not on this list which does not support downstream products and derivatives, many of which should not be used in any production system, as they do nothing towards the essential task of updating the data, or providing clear and usable automated processes or documentation about maintaining the data, or providing processes or information about managing it.
To find out if it is possible to query the time zone version under Joda time, raise a documentation issue at:
https://github.com/JodaOrg/joda-time/issues
and request they provide the sample code and add that to their documentation.
To update Joda-time TZ data follow the build process at to rebuild the library:
https://www.joda.org/joda-time/tz_update.html
and raise an operational issue requesting an automated process be added to automatically download, apply, and update the library.
As recommended you should have upgraded from this project to java.time when Java 8 was released:
https://www.joda.org/joda-time/index.html
-- 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.]
On 2020-05-22 14:43, Sundar Sarma wrote:
Instead of java.time (System.out.println(java.time.zone.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 <mailto: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.]
participants (3)
-
Brian Inglis
-
Stephen Colebourne
-
Sundar Sarma