Skip to content

Commit da0af49

Browse files
committed
test: Replace %+ format with explicit one
%+ is an extension that jiff doesn't support (if we still want to convert parse_datetime in the future, and since these are tests, it's probably better to use an explicit format.
1 parent e00555c commit da0af49

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/items/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ mod tests {
518518
// https://github.com/uutils/coreutils/issues/5177
519519
assert_eq!(
520520
"2023-07-27T13:53:54+00:00",
521-
test_eq_fmt("%+", "@1690466034")
521+
test_eq_fmt("%Y-%m-%dT%H:%M:%S%:z", "@1690466034")
522522
);
523523

524524
// https://github.com/uutils/coreutils/issues/6398

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ mod tests {
666666
assert_eq!(
667667
parse_datetime("28 feb 2023 + 1 day")
668668
.unwrap()
669-
.format("%+")
669+
.format("%Y-%m-%dT%H:%M:%S%:z")
670670
.to_string(),
671671
"2023-03-01T00:00:00+00:00"
672672
);
@@ -678,15 +678,15 @@ mod tests {
678678
assert_eq!(
679679
parse_datetime("2024-01-31 + 1 month")
680680
.unwrap()
681-
.format("%+")
681+
.format("%Y-%m-%dT%H:%M:%S%:z")
682682
.to_string(),
683683
"2024-03-02T00:00:00+00:00",
684684
);
685685

686686
assert_eq!(
687687
parse_datetime("2024-02-29 + 1 month")
688688
.unwrap()
689-
.format("%+")
689+
.format("%Y-%m-%dT%H:%M:%S%:z")
690690
.to_string(),
691691
"2024-03-29T00:00:00+00:00",
692692
);

0 commit comments

Comments
 (0)