Question about invalid timezone file: no timezone found in OlsonData

Hello, I have a program running on Yocto. When it runs, I get an error: /usr/share/zoneinfo/Israel: invalid timezone file: no timezone found in OlsonData If I copy zoneinfo's directory from Linux distros (Debian, Ubutnu, ArchLinux), the program runs without an error. I downloaded tzdb-2021a.tar.lz and installed it, encountered the same error. Did I miss something? Thanks. - Joe

On 6/8/21 7:14 AM, Joe Culler via tz wrote:
I have a program running on Yocto. When it runs, I get an error: /usr/share/zoneinfo/Israel: invalid timezone file: no timezone found in OlsonData
If I copy zoneinfo's directory from Linux distros (Debian, Ubutnu, ArchLinux), the program runs without an error.
I downloaded tzdb-2021a.tar.lz and installed it, encountered the same error. Did I miss something? Thanks.
My guess from the diagnostic's wording is that it comes from the timezone-olson package for Haskell. If so, possibly you ran into timezone-olson bug #7 <https://github.com/ygale/timezone-olson/issues/7>, which means that upgrading the current timezone-olson should fix your problem. If upgrading doesn't work, possibly a followup bug report there is in order. You might also try building your copy of tzdata with 'make ZFLAGS=-bfat', which will generate fatter TZif files that might work better with a buggy TZif reader. For Israel, your TZif file should grow from 1074 to 2388 bytes if you build it that way. I'm attaching copies of slim and fat TZif files for Israel, and you can use these copies to check your work. There's a bit more about fat and slim files for Haskell at <https://hackage.haskell.org/package/tzdata>. Yet another possibility is that /usr/share/zoneinfo/Israel simply isn't set up correctly. Typically it's a symbolic or hard link to /usr/share/zoneinfo/Asia/Jerusalem, and you can check that out. I don't know Yocto, but it's something like the following on Ubuntu: 514-day $ ls -li /usr/share/zoneinfo/Israel 1205004 lrwxrwxrwx 1 root root 14 Jan 27 08:51 /usr/share/zoneinfo/Israel -> Asia/Jerusalem 515-day $ ls -liL /usr/share/zoneinfo/Israel 1194127 -rw-r--r-- 1 root root 2388 Jan 27 08:51 /usr/share/zoneinfo/Israel 516-day $ zdump -V -c 2021,2022 /usr/share/zoneinfo/Israel /usr/share/zoneinfo/Israel Thu Mar 25 23:59:59 2021 UT = Fri Mar 26 01:59:59 2021 IST isdst=0 gmtoff=7200 /usr/share/zoneinfo/Israel Fri Mar 26 00:00:00 2021 UT = Fri Mar 26 03:00:00 2021 IDT isdst=1 gmtoff=10800 /usr/share/zoneinfo/Israel Sat Oct 30 22:59:59 2021 UT = Sun Oct 31 01:59:59 2021 IDT isdst=1 gmtoff=10800 /usr/share/zoneinfo/Israel Sat Oct 30 23:00:00 2021 UT = Sun Oct 31 01:00:00 2021 IST isdst=0 gmtoff=7200 or the following on Fedora: 4-penguin $ ls -li /usr/share/zoneinfo/Israel 2494621 -rw-r--r--. 3 root root 2388 Jan 25 19:02 /usr/share/zoneinfo/Israel 5-penguin $ find /usr/share/zoneinfo -inum 2494621 /usr/share/zoneinfo/Israel /usr/share/zoneinfo/Asia/Jerusalem /usr/share/zoneinfo/Asia/Tel_Aviv with similar zdump output there.

On Wed, Jun 9, 2021 at 12:00 AM Paul Eggert <eggert@cs.ucla.edu> wrote:
On 6/8/21 7:14 AM, Joe Culler via tz wrote:
I have a program running on Yocto. When it runs, I get an error: /usr/share/zoneinfo/Israel: invalid timezone file: no timezone found in OlsonData
If I copy zoneinfo's directory from Linux distros (Debian, Ubutnu, ArchLinux), the program runs without an error.
I downloaded tzdb-2021a.tar.lz and installed it, encountered the same error. Did I miss something? Thanks.
My guess from the diagnostic's wording is that it comes from the timezone-olson package for Haskell. If so, possibly you ran into timezone-olson bug #7 <https://github.com/ygale/timezone-olson/issues/7>, which means that upgrading the current timezone-olson should fix your problem. If upgrading doesn't work, possibly a followup bug report there is in order.
Thank you Paul. My problem was solved by simply updating timezone-olson to 0.2.0.
You might also try building your copy of tzdata with 'make ZFLAGS=-bfat', which will generate fatter TZif files that might work better with a buggy TZif reader. For Israel, your TZif file should grow from 1074 to 2388 bytes if you build it that way. I'm attaching copies of slim and fat TZif files for Israel, and you can use these copies to check your work. There's a bit more about fat and slim files for Haskell at <https://hackage.haskell.org/package/tzdata>.
Yet another possibility is that /usr/share/zoneinfo/Israel simply isn't set up correctly. Typically it's a symbolic or hard link to /usr/share/zoneinfo/Asia/Jerusalem, and you can check that out. I don't know Yocto, but it's something like the following on Ubuntu:
514-day $ ls -li /usr/share/zoneinfo/Israel 1205004 lrwxrwxrwx 1 root root 14 Jan 27 08:51 /usr/share/zoneinfo/Israel -> Asia/Jerusalem 515-day $ ls -liL /usr/share/zoneinfo/Israel 1194127 -rw-r--r-- 1 root root 2388 Jan 27 08:51 /usr/share/zoneinfo/Israel 516-day $ zdump -V -c 2021,2022 /usr/share/zoneinfo/Israel /usr/share/zoneinfo/Israel Thu Mar 25 23:59:59 2021 UT = Fri Mar 26 01:59:59 2021 IST isdst=0 gmtoff=7200 /usr/share/zoneinfo/Israel Fri Mar 26 00:00:00 2021 UT = Fri Mar 26 03:00:00 2021 IDT isdst=1 gmtoff=10800 /usr/share/zoneinfo/Israel Sat Oct 30 22:59:59 2021 UT = Sun Oct 31 01:59:59 2021 IDT isdst=1 gmtoff=10800 /usr/share/zoneinfo/Israel Sat Oct 30 23:00:00 2021 UT = Sun Oct 31 01:00:00 2021 IST isdst=0 gmtoff=7200
or the following on Fedora:
4-penguin $ ls -li /usr/share/zoneinfo/Israel 2494621 -rw-r--r--. 3 root root 2388 Jan 25 19:02 /usr/share/zoneinfo/Israel 5-penguin $ find /usr/share/zoneinfo -inum 2494621 /usr/share/zoneinfo/Israel /usr/share/zoneinfo/Asia/Jerusalem /usr/share/zoneinfo/Asia/Tel_Aviv
with similar zdump output there.

On 14.06.21 14:01, Joe Culler via tz wrote:
On Wed, Jun 9, 2021 at 12:00 AM Paul Eggert <eggert@cs.ucla.edu <mailto:eggert@cs.ucla.edu>> wrote:
On 6/8/21 7:14 AM, Joe Culler via tz wrote:
> I have a program running on Yocto. When it runs, I get an error: > /usr/share/zoneinfo/Israel: invalid timezone file: no timezone found in > OlsonData >
There is no TZ zone named Israel. There are only Asia/Jerusalem Asia/Hebron Asia/Gaza TZ zones are generally not named after countries, but after cities.
participants (3)
-
Alois Treindl
-
Joe Culler
-
Paul Eggert