Skip to content

Commit 16b3865

Browse files
committed
chore: silence cspell for timezone abbreviations (AWST, ACST, ACDT, Kolkata, tzdb)
1 parent 49c3386 commit 16b3865

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/uu/date/src/date.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -454,13 +454,13 @@ fn make_format_string(settings: &Settings) -> &str {
454454
///
455455
/// Disambiguation rationale (GNU compatible):
456456
/// - CST: Central Standard Time (US) preferred over China/Cuba Standard Time
457-
/// - EST: Eastern Standard Time (US) preferred over Australian Eastern Standard Time
457+
/// - EST: Eastern Standard Time (US) preferred over Australian Eastern Standard Time
458458
/// - IST: India Standard Time preferred over Israel/Irish Standard Time
459459
/// - MST: Mountain Standard Time (US) preferred over Malaysia Standard Time
460460
/// - PST: Pacific Standard Time (US) - widely used abbreviation
461461
/// - GMT: Alias for UTC (universal)
462462
///
463-
/// All other timezones (AWST, JST, CET, etc.) are dynamically resolved from IANA database.
463+
/// All other timezones (AWST, JST, CET, etc.) are dynamically resolved from IANA database. // spell-checker:disable-line
464464
static PREFERRED_TZ_MAPPINGS: &[(&str, &str)] = &[
465465
// Universal (no ambiguity, but commonly used)
466466
("UTC", "UTC"),
@@ -475,7 +475,7 @@ static PREFERRED_TZ_MAPPINGS: &[(&str, &str)] = &[
475475
("EST", "America/New_York"), // Ambiguous: US vs Australia
476476
("EDT", "America/New_York"),
477477
// Other highly ambiguous cases
478-
("IST", "Asia/Kolkata"), // Ambiguous: India vs Israel vs Ireland
478+
("IST", "Asia/Kolkata"), // Ambiguous: India vs Israel vs Ireland // spell-checker:disable-line
479479
];
480480

481481
/// Lazy-loaded timezone abbreviation lookup map built from IANA database.
@@ -493,7 +493,8 @@ fn build_tz_abbrev_map() -> HashMap<String, String> {
493493

494494
// Then, try to find additional abbreviations from IANA database
495495
// This gives us broader coverage while respecting disambiguation preferences
496-
let tzdb = TimeZoneDatabase::from_env();
496+
let tzdb = TimeZoneDatabase::from_env(); // spell-checker:disable-line
497+
// spell-checker:disable-next-line
497498
for tz_name in tzdb.available() {
498499
let tz_str = tz_name.as_str();
499500
// Skip if we already have a preferred mapping for this zone

tests/by-util/test_date.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ fn test_date_tz_various_formats() {
660660
"-0800 -08:00 -08:00:00 -08 PST\n",
661661
);
662662
// Half-hour timezone
663-
test_tz("Asia/Kolkata", JAN2, "+0530 +05:30 +05:30:00 +05:30 IST\n");
663+
test_tz("Asia/Kolkata", JAN2, "+0530 +05:30 +05:30:00 +05:30 IST\n"); // spell-checker:disable-line
664664
test_tz("Europe/Berlin", JAN2, "+0100 +01:00 +01:00:00 +01 CET\n");
665665
test_tz(
666666
"Australia/Sydney",
@@ -878,9 +878,9 @@ fn test_date_tz_abbreviation_australian_timezones() {
878878
// Test Australian timezone abbreviations (uutils supports, GNU does NOT)
879879
// This demonstrates uutils date going beyond GNU capabilities
880880
let au_zones = vec![
881-
("AWST", "2021-03-20 14:53:01 AWST"), // Western Australia
882-
("ACST", "2021-03-20 14:53:01 ACST"), // Central Australia (Standard)
883-
("ACDT", "2021-03-20 14:53:01 ACDT"), // Central Australia (Daylight)
881+
("AWST", "2021-03-20 14:53:01 AWST"), // Western Australia // spell-checker:disable-line
882+
("ACST", "2021-03-20 14:53:01 ACST"), // Central Australia (Standard) // spell-checker:disable-line
883+
("ACDT", "2021-03-20 14:53:01 ACDT"), // Central Australia (Daylight) // spell-checker:disable-line
884884
("AEST", "2021-03-20 14:53:01 AEST"), // Eastern Australia (Standard)
885885
("AEDT", "2021-03-20 14:53:01 AEDT"), // Eastern Australia (Daylight)
886886
];
@@ -921,7 +921,7 @@ fn test_date_tz_abbreviation_with_day_of_week() {
921921
// Test timezone abbreviations with full date format including day of week
922922
new_ucmd!()
923923
.arg("-d")
924-
.arg("Sat 20 Mar 2021 14:53:01 AWST")
924+
.arg("Sat 20 Mar 2021 14:53:01 AWST") // spell-checker:disable-line
925925
.arg("+%Y-%m-%d %H:%M:%S")
926926
.succeeds()
927927
.no_stderr();

0 commit comments

Comments
 (0)