[tz] Looking for a way to cut down binary zoneinfo size. Does anyone have the way to?

Viktor Sergiienko singalen at gmail.com
Thu May 18 17:40:30 UTC 2017

Thanks a lot, Arthur!

We have a 1k sector on older systems. I based my estimation on that,
and the total count of files.
Plus, our filesystem keeps symlinks in directory, not in a separate
sector. if I turn more timezones into symlinks, that must save some
space too.

On Thu, May 18, 2017 at 10:29 AM, Arthur David Olson
<arthurdavidolson at gmail.com> wrote:
> Cutting out old data may not buy as much as you'd like. Putting a "timecnt =
> 0" at the top of "writezone" in "zic.c" and then comparing the produced
> directories of the original ("tzraw") and modified ("tzcooked") yields:
>     Script started on Thu, May 18, 2017  1:12:37 PM
>     $ du -s tzraw/tmp/etc tzcooked/tmp/etc
>     3103    tzraw/tmp/etc
>     2356    tzcooked/tmp/etc
>     $ exit
>     exit
>     Script done on Thu, May 18, 2017  1:12:49 PM
> Limited savings is due to disk sector size; as an example, the
> "America/New_York" produced by an unmodified zic weighs in at 3545 bytes; on
> a 4096-byte-sector system, the one sector it takes can't be reduced.
> (Your correspondent is enough of a fossil to have lived in the age of
> 512-byte sectors.)
> If space is at a premium, be sure to "make REDO=posix_only ..." when
> building.
>     @dashdashado
> On Thu, 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?
>> Thanks!

More information about the tz mailing list