On 1/31/19 10:04 AM, Paul.Koning@dell.com wrote:
On Jan 31, 2019, at 7:18 AM, Christopher Wong <christopher.wong@axis.com <mailto:christopher.wong@axis.com>> wrote:
Hi,
I think the tzdb is very good with its history. However, I would like to minimize the size and has been looking into how to achieve that.
Will it be of any interest with an option in zic to include only data from a certain year onward?
What is the best way? 1. Remove the Rules and Zone entries not relevant for that year onward during the parsing. Tried this, but ended up with with some nasty warnings. 2. Make changes in writezone-function. Trying this now, but I am getting confused with types, omittype, typemap, and so on.
It would be good if someone that knows the code can give me some hints if this is the right place to make such a change.
BR, Christopher Wong
Yes, this is a very useful feature. I did it years ago for an embedded system product. The right answer is 2 -- a new command line switch in zic to specify the start year, and a simple change in writezone to omit writing data for transitions older than the start date. You have to be a bit careful to make sure that the rule in effect AT the start date appears in the output, i.e., not just transitions that are later than the start date.
To this point, truncation of TZif files is discussed here: https://tools.ietf.org/html/draft-murchison-tzdist-tzif-16#section-5.1 -- Ken Murchison Cyrus Development Team FastMail US LLC