1
1
mirror of https://github.com/wader/fq.git synced 2024-11-29 23:27:12 +03:00
fq/format/tzif/testdata/MST.fqtest
Mattias Wadman 051a70bd4b interp: Change bit ranges to use exclusive end
All other ranges and slicing uses exclusive end so i think it make sense
to make it consistent.

Update docs and add additional example for non-byte-aligned field.

Also fixes issue showing zero bit ranges as start-NA.
2023-10-20 15:37:26 +02:00

258 lines
28 KiB
Plaintext

$ fq -d tzif dv MST
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: MST (tzif) 0x0-0x298 (664)
| | | v1header{}: 0x0-0x2c (44)
0x000|54 5a 69 66 |TZif | magic: 0x545a6966 (valid) 0x0-0x4 (4)
0x000| 32 | 2 | ver: "2" (0x32) (valid) 0x4-0x5 (1)
0x000| 00 00 00 00 00 00 00 00 00 00 00| ...........| reserved: raw bits 0x5-0x14 (15)
0x010|00 00 00 00 |.... |
0x010| 00 00 00 00 | .... | isutcnt: 0 0x14-0x18 (4)
0x010| 00 00 00 00 | .... | isstdcnt: 0 0x18-0x1c (4)
0x010| 00 00 00 1b| ....| leapcnt: 27 0x1c-0x20 (4)
0x020|00 00 00 01 |.... | timecnt: 1 0x20-0x24 (4)
0x020| 00 00 00 01 | .... | typecnt: 1 0x24-0x28 (4)
0x020| 00 00 00 04 | .... | charcnt: 4 0x28-0x2c (4)
| | | v1datablock{}: 0x2c-0x113 (231)
| | | transition_times[0:1]: 0x2c-0x30 (4)
0x020| 64 9b 78 1b| d.x.| [0]: "2023-06-28T00:00:27Z" (1687910427) transition_time 0x2c-0x30 (4)
| | | transition_types[0:1]: 0x30-0x31 (1)
0x030|00 |. | [0]: 0 transition_type 0x30-0x31 (1)
| | | local_time_type_records[0:1]: 0x31-0x37 (6)
| | | [0]{}: local_time_type 0x31-0x37 (6)
0x030| ff ff 9d 90 | .... | utoff: -25200 (valid) 0x31-0x35 (4)
0x030| 00 | . | dst: 0 (valid) 0x35-0x36 (1)
0x030| 00 | . | idx: 0 (valid) 0x36-0x37 (1)
| | | time_zone_designations[0:1]: 0x37-0x3b (4)
0x030| 4d 53 54 00 | MST. | [0]: "MST" time_zone_designation 0x37-0x3b (4)
| | | leap_second_records[0:27]: 0x3b-0x113 (216)
| | | [0]{}: leap_second_record 0x3b-0x43 (8)
0x030| 04 b2 58 00 | ..X. | occur: "1972-07-01T00:00:00Z" (78796800) 0x3b-0x3f (4)
0x030| 00| .| corr: 1 0x3f-0x43 (4)
0x040|00 00 01 |... |
| | | [1]{}: leap_second_record 0x43-0x4b (8)
0x040| 05 a4 ec 01 | .... | occur: "1973-01-01T00:00:01Z" (94694401) 0x43-0x47 (4)
0x040| 00 00 00 02 | .... | corr: 2 0x47-0x4b (4)
| | | [2]{}: leap_second_record 0x4b-0x53 (8)
0x040| 07 86 1f 82 | .... | occur: "1974-01-01T00:00:02Z" (126230402) 0x4b-0x4f (4)
0x040| 00| .| corr: 3 0x4f-0x53 (4)
0x050|00 00 03 |... |
| | | [3]{}: leap_second_record 0x53-0x5b (8)
0x050| 09 67 53 03 | .gS. | occur: "1975-01-01T00:00:03Z" (157766403) 0x53-0x57 (4)
0x050| 00 00 00 04 | .... | corr: 4 0x57-0x5b (4)
| | | [4]{}: leap_second_record 0x5b-0x63 (8)
0x050| 0b 48 86 84 | .H.. | occur: "1976-01-01T00:00:04Z" (189302404) 0x5b-0x5f (4)
0x050| 00| .| corr: 5 0x5f-0x63 (4)
0x060|00 00 05 |... |
| | | [5]{}: leap_second_record 0x63-0x6b (8)
0x060| 0d 2b 0b 85 | .+.. | occur: "1977-01-01T00:00:05Z" (220924805) 0x63-0x67 (4)
0x060| 00 00 00 06 | .... | corr: 6 0x67-0x6b (4)
| | | [6]{}: leap_second_record 0x6b-0x73 (8)
0x060| 0f 0c 3f 06 | ..?. | occur: "1978-01-01T00:00:06Z" (252460806) 0x6b-0x6f (4)
0x060| 00| .| corr: 7 0x6f-0x73 (4)
0x070|00 00 07 |... |
| | | [7]{}: leap_second_record 0x73-0x7b (8)
0x070| 10 ed 72 87 | ..r. | occur: "1979-01-01T00:00:07Z" (283996807) 0x73-0x77 (4)
0x070| 00 00 00 08 | .... | corr: 8 0x77-0x7b (4)
| | | [8]{}: leap_second_record 0x7b-0x83 (8)
0x070| 12 ce a6 08 | .... | occur: "1980-01-01T00:00:08Z" (315532808) 0x7b-0x7f (4)
0x070| 00| .| corr: 9 0x7f-0x83 (4)
0x080|00 00 09 |... |
| | | [9]{}: leap_second_record 0x83-0x8b (8)
0x080| 15 9f ca 89 | .... | occur: "1981-07-01T00:00:09Z" (362793609) 0x83-0x87 (4)
0x080| 00 00 00 0a | .... | corr: 10 0x87-0x8b (4)
| | | [10]{}: leap_second_record 0x8b-0x93 (8)
0x080| 17 80 fe 0a | .... | occur: "1982-07-01T00:00:10Z" (394329610) 0x8b-0x8f (4)
0x080| 00| .| corr: 11 0x8f-0x93 (4)
0x090|00 00 0b |... |
| | | [11]{}: leap_second_record 0x93-0x9b (8)
0x090| 19 62 31 8b | .b1. | occur: "1983-07-01T00:00:11Z" (425865611) 0x93-0x97 (4)
0x090| 00 00 00 0c | .... | corr: 12 0x97-0x9b (4)
| | | [12]{}: leap_second_record 0x9b-0xa3 (8)
0x090| 1d 25 ea 0c | .%.. | occur: "1985-07-01T00:00:12Z" (489024012) 0x9b-0x9f (4)
0x090| 00| .| corr: 13 0x9f-0xa3 (4)
0x0a0|00 00 0d |... |
| | | [13]{}: leap_second_record 0xa3-0xab (8)
0x0a0| 21 da e5 0d | !... | occur: "1988-01-01T00:00:13Z" (567993613) 0xa3-0xa7 (4)
0x0a0| 00 00 00 0e | .... | corr: 14 0xa7-0xab (4)
| | | [14]{}: leap_second_record 0xab-0xb3 (8)
0x0a0| 25 9e 9d 8e | %... | occur: "1990-01-01T00:00:14Z" (631152014) 0xab-0xaf (4)
0x0a0| 00| .| corr: 15 0xaf-0xb3 (4)
0x0b0|00 00 0f |... |
| | | [15]{}: leap_second_record 0xb3-0xbb (8)
0x0b0| 27 7f d1 0f | '... | occur: "1991-01-01T00:00:15Z" (662688015) 0xb3-0xb7 (4)
0x0b0| 00 00 00 10 | .... | corr: 16 0xb7-0xbb (4)
| | | [16]{}: leap_second_record 0xbb-0xc3 (8)
0x0b0| 2a 50 f5 90 | *P.. | occur: "1992-07-01T00:00:16Z" (709948816) 0xbb-0xbf (4)
0x0b0| 00| .| corr: 17 0xbf-0xc3 (4)
0x0c0|00 00 11 |... |
| | | [17]{}: leap_second_record 0xc3-0xcb (8)
0x0c0| 2c 32 29 11 | ,2). | occur: "1993-07-01T00:00:17Z" (741484817) 0xc3-0xc7 (4)
0x0c0| 00 00 00 12 | .... | corr: 18 0xc7-0xcb (4)
| | | [18]{}: leap_second_record 0xcb-0xd3 (8)
0x0c0| 2e 13 5c 92 | ..\. | occur: "1994-07-01T00:00:18Z" (773020818) 0xcb-0xcf (4)
0x0c0| 00| .| corr: 19 0xcf-0xd3 (4)
0x0d0|00 00 13 |... |
| | | [19]{}: leap_second_record 0xd3-0xdb (8)
0x0d0| 30 e7 24 13 | 0.$. | occur: "1996-01-01T00:00:19Z" (820454419) 0xd3-0xd7 (4)
0x0d0| 00 00 00 14 | .... | corr: 20 0xd7-0xdb (4)
| | | [20]{}: leap_second_record 0xdb-0xe3 (8)
0x0d0| 33 b8 48 94 | 3.H. | occur: "1997-07-01T00:00:20Z" (867715220) 0xdb-0xdf (4)
0x0d0| 00| .| corr: 21 0xdf-0xe3 (4)
0x0e0|00 00 15 |... |
| | | [21]{}: leap_second_record 0xe3-0xeb (8)
0x0e0| 36 8c 10 15 | 6... | occur: "1999-01-01T00:00:21Z" (915148821) 0xe3-0xe7 (4)
0x0e0| 00 00 00 16 | .... | corr: 22 0xe7-0xeb (4)
| | | [22]{}: leap_second_record 0xeb-0xf3 (8)
0x0e0| 43 b7 1b 96 | C... | occur: "2006-01-01T00:00:22Z" (1136073622) 0xeb-0xef (4)
0x0e0| 00| .| corr: 23 0xef-0xf3 (4)
0x0f0|00 00 17 |... |
| | | [23]{}: leap_second_record 0xf3-0xfb (8)
0x0f0| 49 5c 07 97 | I\.. | occur: "2009-01-01T00:00:23Z" (1230768023) 0xf3-0xf7 (4)
0x0f0| 00 00 00 18 | .... | corr: 24 0xf7-0xfb (4)
| | | [24]{}: leap_second_record 0xfb-0x103 (8)
0x0f0| 4f ef 93 18 | O... | occur: "2012-07-01T00:00:24Z" (1341100824) 0xfb-0xff (4)
0x0f0| 00| .| corr: 25 0xff-0x103 (4)
0x100|00 00 19 |... |
| | | [25]{}: leap_second_record 0x103-0x10b (8)
0x100| 55 93 2d 99 | U.-. | occur: "2015-07-01T00:00:25Z" (1435708825) 0x103-0x107 (4)
0x100| 00 00 00 1a | .... | corr: 26 0x107-0x10b (4)
| | | [26]{}: leap_second_record 0x10b-0x113 (8)
0x100| 58 68 46 9a | XhF. | occur: "2017-01-01T00:00:26Z" (1483228826) 0x10b-0x10f (4)
0x100| 00| .| corr: 27 0x10f-0x113 (4)
0x110|00 00 1b |... |
| | | standard_wall_indicators[0:0]: 0x113-0x113 (0)
| | | ut_local_indicators[0:0]: 0x113-0x113 (0)
| | | v2plusheader{}: 0x113-0x13f (44)
0x110| 54 5a 69 66 | TZif | magic: 0x545a6966 (valid) 0x113-0x117 (4)
0x110| 32 | 2 | ver: "2" (0x32) (valid) 0x117-0x118 (1)
0x110| 00 00 00 00 00 00 00 00| ........| reserved: raw bits 0x118-0x127 (15)
0x120|00 00 00 00 00 00 00 |....... |
0x120| 00 00 00 00 | .... | isutcnt: 0 0x127-0x12b (4)
0x120| 00 00 00 00 | .... | isstdcnt: 0 0x12b-0x12f (4)
0x120| 00| .| leapcnt: 27 0x12f-0x133 (4)
0x130|00 00 1b |... |
0x130| 00 00 00 01 | .... | timecnt: 1 0x133-0x137 (4)
0x130| 00 00 00 01 | .... | typecnt: 1 0x137-0x13b (4)
0x130| 00 00 00 04 | .... | charcnt: 4 0x13b-0x13f (4)
| | | v2plusdatablock{}: 0x13f-0x296 (343)
| | | transition_times[0:1]: 0x13f-0x147 (8)
0x130| 00| .| [0]: "2023-06-28T00:00:27Z" (1687910427) transition_time 0x13f-0x147 (8)
0x140|00 00 00 64 9b 78 1b |...d.x. |
| | | transition_types[0:1]: 0x147-0x148 (1)
0x140| 00 | . | [0]: 0 transition_type 0x147-0x148 (1)
| | | local_time_type_records[0:1]: 0x148-0x14e (6)
| | | [0]{}: local_time_type 0x148-0x14e (6)
0x140| ff ff 9d 90 | .... | utoff: -25200 (valid) 0x148-0x14c (4)
0x140| 00 | . | dst: 0 (valid) 0x14c-0x14d (1)
0x140| 00 | . | idx: 0 (valid) 0x14d-0x14e (1)
| | | time_zone_designations[0:1]: 0x14e-0x152 (4)
0x140| 4d 53| MS| [0]: "MST" time_zone_designation 0x14e-0x152 (4)
0x150|54 00 |T. |
| | | leap_second_records[0:27]: 0x152-0x296 (324)
| | | [0]{}: leap_second_record 0x152-0x15e (12)
0x150| 00 00 00 00 04 b2 58 00 | ......X. | occur: "1972-07-01T00:00:00Z" (78796800) 0x152-0x15a (8)
0x150| 00 00 00 01 | .... | corr: 1 0x15a-0x15e (4)
| | | [1]{}: leap_second_record 0x15e-0x16a (12)
0x150| 00 00| ..| occur: "1973-01-01T00:00:01Z" (94694401) 0x15e-0x166 (8)
0x160|00 00 05 a4 ec 01 |...... |
0x160| 00 00 00 02 | .... | corr: 2 0x166-0x16a (4)
| | | [2]{}: leap_second_record 0x16a-0x176 (12)
0x160| 00 00 00 00 07 86| ......| occur: "1974-01-01T00:00:02Z" (126230402) 0x16a-0x172 (8)
0x170|1f 82 |.. |
0x170| 00 00 00 03 | .... | corr: 3 0x172-0x176 (4)
| | | [3]{}: leap_second_record 0x176-0x182 (12)
0x170| 00 00 00 00 09 67 53 03 | .....gS. | occur: "1975-01-01T00:00:03Z" (157766403) 0x176-0x17e (8)
0x170| 00 00| ..| corr: 4 0x17e-0x182 (4)
0x180|00 04 |.. |
| | | [4]{}: leap_second_record 0x182-0x18e (12)
0x180| 00 00 00 00 0b 48 86 84 | .....H.. | occur: "1976-01-01T00:00:04Z" (189302404) 0x182-0x18a (8)
0x180| 00 00 00 05 | .... | corr: 5 0x18a-0x18e (4)
| | | [5]{}: leap_second_record 0x18e-0x19a (12)
0x180| 00 00| ..| occur: "1977-01-01T00:00:05Z" (220924805) 0x18e-0x196 (8)
0x190|00 00 0d 2b 0b 85 |...+.. |
0x190| 00 00 00 06 | .... | corr: 6 0x196-0x19a (4)
| | | [6]{}: leap_second_record 0x19a-0x1a6 (12)
0x190| 00 00 00 00 0f 0c| ......| occur: "1978-01-01T00:00:06Z" (252460806) 0x19a-0x1a2 (8)
0x1a0|3f 06 |?. |
0x1a0| 00 00 00 07 | .... | corr: 7 0x1a2-0x1a6 (4)
| | | [7]{}: leap_second_record 0x1a6-0x1b2 (12)
0x1a0| 00 00 00 00 10 ed 72 87 | ......r. | occur: "1979-01-01T00:00:07Z" (283996807) 0x1a6-0x1ae (8)
0x1a0| 00 00| ..| corr: 8 0x1ae-0x1b2 (4)
0x1b0|00 08 |.. |
| | | [8]{}: leap_second_record 0x1b2-0x1be (12)
0x1b0| 00 00 00 00 12 ce a6 08 | ........ | occur: "1980-01-01T00:00:08Z" (315532808) 0x1b2-0x1ba (8)
0x1b0| 00 00 00 09 | .... | corr: 9 0x1ba-0x1be (4)
| | | [9]{}: leap_second_record 0x1be-0x1ca (12)
0x1b0| 00 00| ..| occur: "1981-07-01T00:00:09Z" (362793609) 0x1be-0x1c6 (8)
0x1c0|00 00 15 9f ca 89 |...... |
0x1c0| 00 00 00 0a | .... | corr: 10 0x1c6-0x1ca (4)
| | | [10]{}: leap_second_record 0x1ca-0x1d6 (12)
0x1c0| 00 00 00 00 17 80| ......| occur: "1982-07-01T00:00:10Z" (394329610) 0x1ca-0x1d2 (8)
0x1d0|fe 0a |.. |
0x1d0| 00 00 00 0b | .... | corr: 11 0x1d2-0x1d6 (4)
| | | [11]{}: leap_second_record 0x1d6-0x1e2 (12)
0x1d0| 00 00 00 00 19 62 31 8b | .....b1. | occur: "1983-07-01T00:00:11Z" (425865611) 0x1d6-0x1de (8)
0x1d0| 00 00| ..| corr: 12 0x1de-0x1e2 (4)
0x1e0|00 0c |.. |
| | | [12]{}: leap_second_record 0x1e2-0x1ee (12)
0x1e0| 00 00 00 00 1d 25 ea 0c | .....%.. | occur: "1985-07-01T00:00:12Z" (489024012) 0x1e2-0x1ea (8)
0x1e0| 00 00 00 0d | .... | corr: 13 0x1ea-0x1ee (4)
| | | [13]{}: leap_second_record 0x1ee-0x1fa (12)
0x1e0| 00 00| ..| occur: "1988-01-01T00:00:13Z" (567993613) 0x1ee-0x1f6 (8)
0x1f0|00 00 21 da e5 0d |..!... |
0x1f0| 00 00 00 0e | .... | corr: 14 0x1f6-0x1fa (4)
| | | [14]{}: leap_second_record 0x1fa-0x206 (12)
0x1f0| 00 00 00 00 25 9e| ....%.| occur: "1990-01-01T00:00:14Z" (631152014) 0x1fa-0x202 (8)
0x200|9d 8e |.. |
0x200| 00 00 00 0f | .... | corr: 15 0x202-0x206 (4)
| | | [15]{}: leap_second_record 0x206-0x212 (12)
0x200| 00 00 00 00 27 7f d1 0f | ....'... | occur: "1991-01-01T00:00:15Z" (662688015) 0x206-0x20e (8)
0x200| 00 00| ..| corr: 16 0x20e-0x212 (4)
0x210|00 10 |.. |
| | | [16]{}: leap_second_record 0x212-0x21e (12)
0x210| 00 00 00 00 2a 50 f5 90 | ....*P.. | occur: "1992-07-01T00:00:16Z" (709948816) 0x212-0x21a (8)
0x210| 00 00 00 11 | .... | corr: 17 0x21a-0x21e (4)
| | | [17]{}: leap_second_record 0x21e-0x22a (12)
0x210| 00 00| ..| occur: "1993-07-01T00:00:17Z" (741484817) 0x21e-0x226 (8)
0x220|00 00 2c 32 29 11 |..,2). |
0x220| 00 00 00 12 | .... | corr: 18 0x226-0x22a (4)
| | | [18]{}: leap_second_record 0x22a-0x236 (12)
0x220| 00 00 00 00 2e 13| ......| occur: "1994-07-01T00:00:18Z" (773020818) 0x22a-0x232 (8)
0x230|5c 92 |\. |
0x230| 00 00 00 13 | .... | corr: 19 0x232-0x236 (4)
| | | [19]{}: leap_second_record 0x236-0x242 (12)
0x230| 00 00 00 00 30 e7 24 13 | ....0.$. | occur: "1996-01-01T00:00:19Z" (820454419) 0x236-0x23e (8)
0x230| 00 00| ..| corr: 20 0x23e-0x242 (4)
0x240|00 14 |.. |
| | | [20]{}: leap_second_record 0x242-0x24e (12)
0x240| 00 00 00 00 33 b8 48 94 | ....3.H. | occur: "1997-07-01T00:00:20Z" (867715220) 0x242-0x24a (8)
0x240| 00 00 00 15 | .... | corr: 21 0x24a-0x24e (4)
| | | [21]{}: leap_second_record 0x24e-0x25a (12)
0x240| 00 00| ..| occur: "1999-01-01T00:00:21Z" (915148821) 0x24e-0x256 (8)
0x250|00 00 36 8c 10 15 |..6... |
0x250| 00 00 00 16 | .... | corr: 22 0x256-0x25a (4)
| | | [22]{}: leap_second_record 0x25a-0x266 (12)
0x250| 00 00 00 00 43 b7| ....C.| occur: "2006-01-01T00:00:22Z" (1136073622) 0x25a-0x262 (8)
0x260|1b 96 |.. |
0x260| 00 00 00 17 | .... | corr: 23 0x262-0x266 (4)
| | | [23]{}: leap_second_record 0x266-0x272 (12)
0x260| 00 00 00 00 49 5c 07 97 | ....I\.. | occur: "2009-01-01T00:00:23Z" (1230768023) 0x266-0x26e (8)
0x260| 00 00| ..| corr: 24 0x26e-0x272 (4)
0x270|00 18 |.. |
| | | [24]{}: leap_second_record 0x272-0x27e (12)
0x270| 00 00 00 00 4f ef 93 18 | ....O... | occur: "2012-07-01T00:00:24Z" (1341100824) 0x272-0x27a (8)
0x270| 00 00 00 19 | .... | corr: 25 0x27a-0x27e (4)
| | | [25]{}: leap_second_record 0x27e-0x28a (12)
0x270| 00 00| ..| occur: "2015-07-01T00:00:25Z" (1435708825) 0x27e-0x286 (8)
0x280|00 00 55 93 2d 99 |..U.-. |
0x280| 00 00 00 1a | .... | corr: 26 0x286-0x28a (4)
| | | [26]{}: leap_second_record 0x28a-0x296 (12)
0x280| 00 00 00 00 58 68| ....Xh| occur: "2017-01-01T00:00:26Z" (1483228826) 0x28a-0x292 (8)
0x290|46 9a |F. |
0x290| 00 00 00 1b | .... | corr: 27 0x292-0x296 (4)
| | | standard_wall_indicators[0:0]: 0x296-0x296 (0)
| | | ut_local_indicators[0:0]: 0x296-0x296 (0)
| | | footer{}: 0x296-0x298 (2)
0x290| 0a | . | nl1: 10 (valid) 0x296-0x297 (1)
| | | tz_string: "" 0x297-0x297 (0)
0x290| 0a| | .| | nl2: 10 (valid) 0x297-0x298 (1)