
Jon Skeet wrote:
I'd be perfectly happy with zdump gaining more display options, but I think there's still huge benefit in deciding on one *canonical* format for validation.
I looked into the format you suggested, along with the other comments noted and formats I've seen elsewhere (e.g., Shanks), and came up with the attached proposal for a "canonical" -i format for zdump, with the design goals being a format that is unambiguous, easy to review, and compact. Although this format's columns don't always line up, in general aligning columns appears to be impractical (in the extreme case, year numbers might exceed 9999!), and I found that unaligned columns make it easier to see glitches anyway. The proposed -i format does not contain versioning information as that would complicate regression testing. For what it's worth, the -i format is about 10% the size of -v format, and is about 53% the size of the format you proposed. This proposal is incomplete, for several reasons. First, it doesn't address leap seconds. Second, it doesn't abbreviate predicted futures into POSIX TZ strings; fixing this would make the output significantly shorter. Third, there is no infrastructure for verifying a distribution by checksumming its zdump -i output. So the proposal is documented as being experimental in the attached patch, and I haven't installed it on github yet. Of course zdump -v has all these problems as well, so the proposal format wouldn't make these problems worse. The first attachment consists of the revised man-page output; the second attachment is the change to tzcode.