File tree 1 file changed +22
-6
lines changed
1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -13,19 +13,35 @@ location on Earth.
13
13
14
14
## Running the example
15
15
16
- cargo run --example demo data/timezone21.bin 35.0715 -82.5216
16
+ ```
17
+ $ cargo run --example demo data/timezone21.bin 35.0715 -82.5216
18
+ zone 0: ZoneMatch {
19
+ kind: InZone,
20
+ zone: Zone {
21
+ polygon_id: 1458,
22
+ meta_id: 3199,
23
+ fields: {
24
+ "CountryAlpha2": "US",
25
+ "CountryName": "United States",
26
+ "TimezoneIdPrefix": "America/",
27
+ "TimezoneId": "New_York",
28
+ },
29
+ },
30
+ }
31
+ ```
17
32
18
33
## Data source
19
34
20
35
The database containing the location and timezone data is in
21
36
` data/timezone21.bin ` . It can be updated as follows:
22
37
23
- git clone https://github.com/BertoldVdb/ZoneDetect
24
- cd ZoneDetect/database/builder
25
- ./makedb.sh
38
+ ```
39
+ git clone https://github.com/BertoldVdb/ZoneDetect
40
+ cd ZoneDetect/database/builder
41
+ ./makedb.sh
42
+ cp out_v1/timezone21.bin zone-detect-rs/data/timezone21.bin
43
+ ```
26
44
27
- This will produce, among other things, ` out_v1/timezone21.bin ` .
28
-
29
45
## Testing
30
46
31
47
There's a slow test that generates random values and compares the output
You can’t perform that action at this time.
0 commit comments