File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ # Zoneinfo_rs
3
+
4
+ ** NOTE:** This crate is experimental and should be considered unstable.
5
+
6
+ ` zoneinfo_rs ` provides basic parsing and compilation of IANA's time zone database
7
+ zoneinfo files.
8
+
9
+ ``` rust
10
+ use std :: path :: Path ;
11
+ use zoneinfo_rs :: {ZoneInfoData , ZoneInfoCompiler };
12
+ // Below assumes we are in the parent directory of `tzdata`
13
+ let zoneinfo_filepath = Path :: new (" ./tzdata/" );
14
+ let parsed_data = ZoneInfoData :: from_zoneinfo_directory (zoneinfo_filepath )? ;
15
+ let _compiled_data = ZoneInfoCompiler :: new (parsed_data ). build ();
16
+ ```
17
+
18
+ ## Extra notes
19
+
20
+ Currently, parsing only supports parsing of zoneinfo files and none of the preprocessing
21
+ typically completed by ` awk ` scripts in tzdata.
22
+
23
+ It is recommended to still use the baseline awk script until preprocessing is supported.
24
+
25
+ ## IANA tzdb repository
26
+
27
+ The latest version of the time zone database can be found [ here] ( https://www.iana.org/time-zones )
28
+
You can’t perform that action at this time.
0 commit comments