diff --git a/format/tzif/testdata/generate_fqtest.sh b/format/tzif/testdata/generate_fqtest.sh index e21fbf2c..7470b14a 100755 --- a/format/tzif/testdata/generate_fqtest.sh +++ b/format/tzif/testdata/generate_fqtest.sh @@ -49,6 +49,9 @@ tear_down() { if grep "error" ./*.fqtest; then exit 1 fi + + echo '$ fq -h tzif' > help_tzif.fqtest + ../../../fq -h tzif >> help_tzif.fqtest ) result=0 diff --git a/format/tzif/testdata/help_tzif.fqtest b/format/tzif/testdata/help_tzif.fqtest new file mode 100644 index 00000000..c1c8c216 --- /dev/null +++ b/format/tzif/testdata/help_tzif.fqtest @@ -0,0 +1,29 @@ +$ fq -h tzif +tzif: Time Zone Information Format decoder + +Decode examples +=============== + + # Decode file as tzif + $ fq -d tzif . file + # Decode value as tzif + ... | tzif + +Get last transition time +======================== + + fq '.v2plusdatablock.transition_times[-1] | tovalue' tziffile + +Count leap second records +========================= + + fq '.v2plusdatablock.leap_second_records | length' tziffile + +Authors +======= +- Takashi Oguma @bitbears-dev (https://github.com/bitbears-dev) @0xb17bea125 (https://twitter.com/0xb17bea125) + +References +========== +- https://datatracker.ietf.org/doc/html/rfc8536 +