mirror of
https://github.com/wader/fq.git
synced 2025-01-08 23:59:50 +03:00
tzif: moved document to tzif.md
This commit is contained in:
parent
4481a77a1c
commit
c4e7fc7919
@ -748,6 +748,16 @@ fq '.tcp_connections[] | select(.server.port=="rtmp") | d' file.cap
|
||||
|
||||
## tzif
|
||||
|
||||
### Get last transition time
|
||||
```sh
|
||||
fq '.v2plusdatablock.transition_times[-1] | tovalue' tziffile
|
||||
```
|
||||
|
||||
### Count leap second records
|
||||
```sh
|
||||
fq '.v2plusdatablock.leap_second_records | length' tziffile
|
||||
```
|
||||
|
||||
### Authors
|
||||
- Takashi Oguma
|
||||
[@bitbears-dev](https://github.com/bitbears-dev)
|
||||
@ -756,7 +766,6 @@ fq '.tcp_connections[] | select(.server.port=="rtmp") | d' file.cap
|
||||
### References
|
||||
- https://datatracker.ietf.org/doc/html/rfc8536
|
||||
|
||||
|
||||
## wasm
|
||||
|
||||
### Count opcode usage
|
||||
|
1724
doc/formats.svg
1724
doc/formats.svg
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 141 KiB |
@ -1,6 +1,7 @@
|
||||
package tzif
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
@ -10,6 +11,9 @@ import (
|
||||
"github.com/wader/fq/pkg/scalar"
|
||||
)
|
||||
|
||||
//go:embed tzif.md
|
||||
var tzifFS embed.FS
|
||||
|
||||
func init() {
|
||||
interp.RegisterFormat(decode.Format{
|
||||
Name: format.TZIF,
|
||||
@ -17,6 +21,7 @@ func init() {
|
||||
DecodeFn: decodeTZIF,
|
||||
Groups: []string{format.PROBE},
|
||||
})
|
||||
interp.RegisterFS(tzifFS)
|
||||
}
|
||||
|
||||
func decodeTZIF(d *decode.D, _ any) any {
|
||||
|
17
format/tzif/tzif.md
Normal file
17
format/tzif/tzif.md
Normal file
@ -0,0 +1,17 @@
|
||||
### Get last transition time
|
||||
```sh
|
||||
fq '.v2plusdatablock.transition_times[-1] | tovalue' tziffile
|
||||
```
|
||||
|
||||
### Count leap second records
|
||||
```sh
|
||||
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
|
Loading…
Reference in New Issue
Block a user