From ccf5abe95377db5b7ee74eead3a64737d1e8f1fb Mon Sep 17 00:00:00 2001
From: Mikael Lindqvist
Date: Thu, 23 Feb 2023 11:30:55 +0800
Subject: [PATCH] fixed lastMod to interpret MDTM time as GMT
---
lib/connection.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/connection.js b/lib/connection.js
index 6e249a5..6354031 100644
--- a/lib/connection.js
+++ b/lib/connection.js
@@ -881,7 +881,7 @@ FTP.prototype.lastMod = function(path, cb) {
if (!val)
return cb(new Error('Invalid date/time format from server'));
ret = new Date(val.year + '-' + val.month + '-' + val.date + 'T' + val.hour
- + ':' + val.minute + ':' + val.second);
+ + ':' + val.minute + ':' + val.second + 'Z');
cb(undefined, ret);
});
};