Skip to content

Commit f1c474a

Browse files
committed
Move backzone stuff into datagen
1 parent 2941cb5 commit f1c474a

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

provider/src/tzdb/datagen.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,14 @@ pub enum IanaDataError {
8686
#[allow(clippy::expect_used, clippy::unwrap_used, reason = "Datagen only")]
8787
impl IanaIdentifierNormalizer<'_> {
8888
pub fn build(tzdata_path: &Path) -> Result<Self, IanaDataError> {
89-
let provider = TzdbDataSource::try_from_zoneinfo_directory(tzdata_path)
89+
let mut provider = TzdbDataSource::try_from_zoneinfo_directory(tzdata_path)
9090
.map_err(IanaDataError::Provider)?;
9191

92+
// This data includes things like Truk/Chuuk which Temporal requires in its tests
93+
// It also includes the packrat data
94+
let backzone = ZoneInfoData::from_filepath(tzdata_path.join("backzone")).unwrap();
95+
provider.data.extend(backzone);
96+
9297
let packrat_overrides: BTreeMap<_, _> = PACKRAT_OVERRIDES.iter().copied().collect();
9398

9499
for pack in provider.data.pack_rat {

zoneinfo/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ use rule::Rules;
6767
use zone::ZoneRecord;
6868

6969
/// Well-known zone info file
70-
pub const ZONEINFO_FILES: [&str; 10] = [
70+
pub const ZONEINFO_FILES: &[&str] = &[
7171
"africa",
7272
"antarctica",
7373
"asia",
@@ -77,7 +77,6 @@ pub const ZONEINFO_FILES: [&str; 10] = [
7777
"europe",
7878
"northamerica",
7979
"southamerica",
80-
"backzone",
8180
];
8281

8382
/// The general error type for `ZoneInfo` operations

0 commit comments

Comments
 (0)