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

Christopher Wong christopher.wong at axis.com
Mon Feb 4 11:06:45 UTC 2019


Hi Paul, thanks for letting me know that I am on the right path choosing to make the change in writezone.


Hi Ken, thanks for the link to RFC draft.


I will probably truncate the start of a TZif file and it states the following in the draft:


   When truncating the start of a TZif file, the service MUST supply in
   the version 2+ data a first transition time that is the start point
   of the truncation range.  As with untruncated TZif files, time type 0
   indicates local time immediately before the start point, and the time
   type of the first transition indicates local time thereafter.?


Does it mean I need to add a start point transition to version 2+, but not to the version 1?


BR,

Christopher Wong


________________________________
From: tz <tz-bounces at iana.org> on behalf of Ken Murchison <murch at fastmail.com>
Sent: Thursday, January 31, 2019 16:08
To: tz at iana.org
Subject: Re: [tz] zic option for including data from a certain year onward



On 1/31/19 10:04 AM, Paul.Koning at dell.com<mailto: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/20190204/b2d1f3c7/attachment.html>


More information about the tz mailing list