Skip to content

Commit ada1886

Browse files
committed
date: adapt to API change in chrono-tz
1 parent 6bedec5 commit ada1886

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uu/date/src/date.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
288288
// GNU `date` uses `%N` for nano seconds, however crate::chrono uses `%f`
289289
let format_string = &format_string
290290
.replace("%N", "%f")
291-
.replace("%Z", tz_abbreviation);
291+
.replace("%Z", tz_abbreviation.unwrap_or("UTC"));
292292
// Refuse to pass this string to chrono as it is crashing in this crate
293293
if format_string.contains("%#z") {
294294
return Err(USimpleError::new(

0 commit comments

Comments
 (0)