[tz] zic option for including data from a certain year onward

Ken Murchison murch at fastmail.com
Thu Jan 31 15:08:22 UTC 2019


On 1/31/19 10:04 AM, Paul.Koning at dell.com wrote:
>
>
>> On Jan 31, 2019, at 7:18 AM, Christopher Wong 
>> <christopher.wong at axis.com <mailto:christopher.wong at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20190131/34b030e9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: murch.vcf
Type: text/x-vcard
Size: 4 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20190131/34b030e9/murch-0001.vcf>


More information about the tz mailing list