summaryrefslogtreecommitdiff
path: root/lib/ftplib.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ftplib.rb')
-rw-r--r--lib/ftplib.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ftplib.rb b/lib/ftplib.rb
index f0c3f109303..617d85899b8 100644
--- a/lib/ftplib.rb
+++ b/lib/ftplib.rb
@@ -452,10 +452,10 @@ class FTP
MDTM_REGEXP = /^(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/
- def mtime(filename)
+ def mtime(filename, local = false)
str = mdtm(filename)
- ary = str.scan(MDTM_REGEXP)[0].collect {|i| i.to_i}
- return Time.gm(*ary)
+ ary = str.scan(MDTM_REGEXP)[0].collect {|i| i.to_i}
+ return local ? Time.local(*ary) : Time.gm(*ary)
end
def mkdir(dirname)