From 6ff024d699846957231c0f332acf99c8962c4c93 Mon Sep 17 00:00:00 2001
From: ZLATAN628 <107628611+ZLATAN628@users.noreply.github.com>
Date: Fri, 24 May 2024 16:10:37 +0800
Subject: [PATCH] fix:ms-dos date format (#84)
* fix:ms-dos date format
* fix:ms-dos date format
---------
Co-authored-by: veeso
---
CHANGELOG.md | 7 +++++++
Cargo.toml | 2 +-
README.md | 2 +-
suppaftp/src/list.rs | 10 +++++-----
4 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d25636c..c36e95c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
# Changelog
- [Changelog](#changelog)
+ - [6.0.1](#601)
- [6.0.0](#600)
- [5.4.0](#540)
- [5.3.1](#531)
@@ -33,6 +34,12 @@
---
+## 6.0.1
+
+Released on 24/05/2024
+
+- [PR 84](/~https://github.com/veeso/suppaftp/pull/84): LIST with DOS lines parsed `%d-%m` but the correct syntax is `%m-%d`
+
## 6.0.0
Released on 20/05/2024
diff --git a/Cargo.toml b/Cargo.toml
index ac70ee2..316a348 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = ["suppaftp", "suppaftp-cli"]
resolver = "2"
[workspace.package]
-version = "6.0.0"
+version = "6.0.1"
edition = "2021"
authors = [
"Christian Visintin ",
diff --git a/README.md b/README.md
index 85f8e98..0c0d1cb 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
Developed by veeso and Matt McCoy
-Current version: 6.0.0 (20/05/2024)
+Current version: 6.0.1 (24/05/2024)
Result {
- NaiveDateTime::parse_from_str(tm, "%d-%m-%y %I:%M%p")
+ NaiveDateTime::parse_from_str(tm, "%m-%d-%y %I:%M%p")
.map(|dt| {
SystemTime::UNIX_EPOCH
.checked_add(Duration::from_secs(dt.and_utc().timestamp() as u64))
@@ -810,7 +810,7 @@ mod test {
.duration_since(SystemTime::UNIX_EPOCH)
.ok()
.unwrap(),
- Duration::from_secs(1407164940)
+ Duration::from_secs(1396969740)
);
// Parse directory
let dir: File = File::try_from("04-08-14 03:09PM docs")
@@ -834,7 +834,7 @@ mod test {
.duration_since(SystemTime::UNIX_EPOCH)
.ok()
.unwrap(),
- Duration::from_secs(1407164940)
+ Duration::from_secs(1396969740)
);
// Error
assert_eq!(
@@ -942,7 +942,7 @@ mod test {
.duration_since(SystemTime::UNIX_EPOCH)
.ok()
.unwrap(),
- Duration::from_secs(1407164940)
+ Duration::from_secs(1396969740)
);
// Not enough argument for datetime
assert!(File::parse_dostime("04-08-14").is_err());