diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-28 08:43:44 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-28 08:43:44 +0000 |
commit | 275b38937e8d89a625351be13d66b4fcb82333db (patch) | |
tree | 8619e9b02aad1f6087f3f329d884d563fa3490a0 /lib/net | |
parent | 040ae9104055d7a4789b46ead215287d5d6ff305 (diff) | |
download | ruby-275b38937e8d89a625351be13d66b4fcb82333db.tar.gz |
* lib/net/ftp.rb (mtime): use usec instead of fractions to parse
decimal fractions of a second correctly when the number of digits
is not 6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/ftp.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 795e1cbdc3..9ce161b7e7 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -895,8 +895,7 @@ module Net raise FTPProtoError, "invalid time-val: #{value}" end usec = fractions.to_i * 10 ** (6 - fractions.to_s.size) - Time.send(local ? :local : :utc, - year, month, day, hour, min, sec, fractions) + Time.send(local ? :local : :utc, year, month, day, hour, min, sec, usec) } FACT_PARSERS = Hash.new(CASE_DEPENDENT_PARSER) FACT_PARSERS["size"] = DECIMAL_PARSER |