1
1
mirror of https://github.com/wader/fq.git synced 2024-11-23 09:56:07 +03:00

tzif: add help_tzif.fqtest

This commit is contained in:
@0xb17bea125 2022-12-04 15:57:13 +09:00
parent c4e7fc7919
commit fd22426b3d
2 changed files with 32 additions and 0 deletions

View File

@ -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

29
format/tzif/testdata/help_tzif.fqtest vendored Normal file
View File

@ -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