[tz] Looking for a way to cut down binary zoneinfo size. Does anyone have the way to?
Paul.Koning at dell.com
Paul.Koning at dell.com
Thu May 18 17:02:22 UTC 2017
> On May 18, 2017, at 12:16 PM, Viktor Sergiienko <singalen at gmail.com> wrote:
>
> Hello,
>
> I'm developing for a pretty small-sized embedded system, and 2.9M of
> binaries is a bit too much for us.
> The system never uses a date before 2007.
>
> I estimate I can slim it down too 500K by cutting down the old data.
>
> 1. I made a script to cut down the source data: all the rules and all
> the zonelines before 2001.
> Compiling this data, I get a lot of errors like:
>
>> "northamerica", line 2537: %s in ruleless zone
>> "northamerica", line 2618: unruly zone
>
> because some zones are left without rules, but with %s format in them.
>
> 2. I tried to modify zic itself, but apparently understanding it will
> take me days.
> Just setting min_year to 2001 results in bunch of
>
>> can't determine time zone abbreviation to use just after until time
>
> Does anyone have a ready solution?
Not completely ready, but... I had the same need some time ago. I made a small change to zic to add a switch that says "omit data from before Y" (with in our case, Y=2001). That produces files that are much shorter, but also a lot of duplicates -- because often two zones differ only in early rules. So I create hardlinks for any duplicate files. The result is about 100kB of actual data.
I don't remember if I tried it at the source level, as you did. I think that's a bit messy for cases where the most recent rule is from before your cutoff. The change in zic was pretty easy.
paul
More information about the tz
mailing list