[tz] zdump new option -i for easier-to-review output

Jon Skeet skeet at pobox.com
Mon Aug 22 07:19:05 UTC 2016


On 21 August 2016 at 11:42, Paul Eggert <eggert at cs.ucla.edu> wrote:

> and "d" instead of "a positive
>> integer" to indicate daylight. (My goal is for this to capture all the
>> relevant information from the original data text files, but the
>> implementation details of is_dst fall outside that scope IMO. That's not
>> part of the source data.)
> The decimal integer does both, no? That is, it captures all the relevant
> information from the original data text files, and it also captures the
> POSIX-specified implementation details. Since zdump is supposed to be
> portable to other implementations where the value of the flag may matter,
> I'm still inclined to have the -i format output that information, as the -v
> format already does.

The problem is it isn't canonical at that point - from the perspective of
information in the source text. If two valid implementations can give two
different outputs, that's a problem for my use case. More below.

> I'm still fine with the idea of transforming some non-ideal-to-me format
>> from zdump into a more canonical format in a simple way though.
> I plan to tweak the -i format to add colons to UT offsets, and do a couple
> of other things to make it easier to view and process (notably, use tabs
> rather than spaces to separate fields, so that people who want columns to
> line up can easily do that).

Well, if the output format isn't suitable as a canonical format for
validating tz text consumers, the readability doesn't matter as much to
me... so long as I can convert it into a format I'm happier with. The
question is really whether we want there to be two formats for the two
slightly different use cases or not.
Now the part about using an unspecified integer or not could be argued to
be more theoretical than practical, of course... if the output data in the
release will always use 1 and 0, I guess I could canonicalize to that... it
doesn't feel nice in terms of relying on anything unspecified, but it may
still be better than having two different formats.

(I'm personally not a big fan of tabs, but I don't want to waste everyone's
time by arguing forever...)

> Also, I would like to distribute a new file that contains the zdump -i
> output, so that changes to the tzdata source can easily be tracked by
> diffing the zdump -i output. This should help with regression testing.

Yes, that would definitely be helpful, regardless of whether the format is
precisely what I'd like :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20160822/42fb1f67/attachment.htm>

More information about the tz mailing list