[tz] zdump new option -i for easier-to-review output
Paul Eggert
eggert at cs.ucla.edu
Mon May 30 21:59:44 UTC 2016
Jon Skeet wrote:
> I'd personally be willing to sacrifice a
> certain amount of compactness for the sake of readability, but obviously if
> we can get the size down a bit*without* losing readability, that would be
> good.
Yes. Readability is to some extent in the eye of the beholder, and the proposed
zgrep -i format wasn't my first choice: it evolved over some time as I used it
to look at a lot of data. To some extent the format is aimed at my needs, and
may be less suited for novices. For example:
TZ="America/Phoenix"
- - -072818 LMT
1883-11-18 12 -07 MST
1918-03-31 03 -06 MDT 1
1918-10-27 01 -07 MST
1919-03-30 03 -06 MDT 1
1919-10-26 01 -07 MST
1942-02-09 03 -06 MWT 1
1943-12-31 23:01 -07 MST
1944-04-01 01:01 -06 MWT 1
1944-09-30 23:01 -07 MST
1967-04-30 03 -06 MDT 1
1967-10-29 01 -07 MST
Here the columns don't line up and although this may be a bit offputting for
some, for me it's a plus as it causes the unusual WWII non-hour transitions to
stand out. Also, it's easier to visually identify the daylight-saving
transitions via "1" vs nothing, than to scan through a column saying "isdst=1"
vs "isdst=0". In contrast:
America/Phoenix
Initially: -07:28:18 standard LMT
1883-11-18 19:00:00Z -07:00:00 standard MST
1918-03-31 09:00:00Z -06:00:00 daylight MDT
1918-10-27 08:00:00Z -07:00:00 standard MST
1919-03-30 09:00:00Z -06:00:00 daylight MDT
1919-10-26 08:00:00Z -07:00:00 standard MST
1942-02-09 09:00:00Z -06:00:00 daylight MWT
1944-01-01 06:01:00Z -07:00:00 standard MST
1944-04-01 07:01:00Z -06:00:00 daylight MWT
1944-10-01 06:01:00Z -07:00:00 standard MST
1967-04-30 09:00:08Z -06:00:00 daylight MDT
1967-10-29 08:00:00Z -07:00:00 standard MST
Although this conveys the same information, it's harder to catch anomalies, as
the nicely-aligned columns and data tend to blur into each other. For example,
it's hard to spot the error that I deliberately introduced into the penultimate
line of that data, whereas the same error would have been much easier to see in
zgrep -i format.
More information about the tz
mailing list