Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/uu/date/src/date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,10 @@ static PREFERRED_TZ_MAPPINGS: &[(&str, &str)] = &[
("ACDT", "Australia/Adelaide"), // Australian Central Daylight Time
("AEST", "Australia/Sydney"), // Australian Eastern Standard Time
("AEDT", "Australia/Sydney"), // Australian Eastern Daylight Time
/* spell-checker: enable */
// German timezones (cannot be discovered from IANA)
("MEZ", "Europe/Berlin"), // MET in German
("MESZ", "Europe/Berlin"), // MEST in German
/* spell-checker: enable */
];

/// Lazy-loaded timezone abbreviation lookup map built from IANA database.
Expand Down
17 changes: 17 additions & 0 deletions tests/by-util/test_date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2636,3 +2636,20 @@ fn test_date_debug_current_time() {
// No parsing happens for "now", so no debug output
assert_eq!(stderr, "");
}

#[test]
fn test_date_tz_abbreviation_german_timezones() {
let de_zones = vec![
("MEZ", "2026-02-20 14:12:01 MEZ"), // German MET abbreviation // spell-checker:disable-line
("MESZ", "2026-02-20 11:59:01 MESZ"), // German MEST abbreviation // spell-checker:disable-line
];

for (_, d) in de_zones {
new_ucmd!()
.arg("-d")
.arg(d)
.arg("+%Y-%m-%d %H:%M:%S")
.succeeds()
.no_stderr();
}
}
Loading