Skip to content

Commit 40bc057

Browse files
author
Igor Mladenovic
committed
Fixed problem with UTC/Local time - MFMT requires always UTC Time
1 parent 273ca30 commit 40bc057

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/connection.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,12 +359,12 @@ FTP.prototype.delete = function(path, cb) {
359359

360360
FTP.prototype.setLastMod = function(path, date, cb) {
361361
var dateStr =
362-
date.getFullYear() +
363-
('00' + (date.getMonth() + 1)).slice(-2) +
364-
('00' + date.getDate()).slice(-2) +
365-
('00' + date.getHours()).slice(-2) +
366-
('00' + date.getMinutes()).slice(-2) +
367-
('00' + date.getSeconds()).slice(-2);
362+
date.getUTCFullYear() +
363+
('00' + (date.getUTCMonth() + 1)).slice(-2) +
364+
('00' + date.getUTCDate()).slice(-2) +
365+
('00' + date.getUTCHours()).slice(-2) +
366+
('00' + date.getUTCMinutes()).slice(-2) +
367+
('00' + date.getUTCSeconds()).slice(-2);
368368
this._send('MFMT ' + dateStr + ' ' + path, cb);
369369
}
370370

0 commit comments

Comments
 (0)