mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
date: adapt to API change in chrono-tz
This commit is contained in:
parent
6bedec53ad
commit
ada18863a7
1 changed files with 1 additions and 1 deletions
|
@ -288,7 +288,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
// GNU `date` uses `%N` for nano seconds, however crate::chrono uses `%f`
|
||||
let format_string = &format_string
|
||||
.replace("%N", "%f")
|
||||
.replace("%Z", tz_abbreviation);
|
||||
.replace("%Z", tz_abbreviation.unwrap_or("UTC"));
|
||||
// Refuse to pass this string to chrono as it is crashing in this crate
|
||||
if format_string.contains("%#z") {
|
||||
return Err(USimpleError::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue