diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-03 18:47:29 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-03 18:47:29 +0000 |
commit | 5de24423e69054fee8ebb92250f22453f4d85b4d (patch) | |
tree | 33fb6a38284dba524e3074cc397f1ddc4eaeb2a8 | |
parent | 7a39fcc19527cf6ac63d7c760c292fab96053244 (diff) |
* lib/time.rb (Time.httpdate): Always return a UTC Time object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/time.rb | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Sun May 4 03:46:42 2014 Tanaka Akira <[email protected]> + + * lib/time.rb (Time.httpdate): Always return a UTC Time object. + Sun May 4 03:26:39 2014 Tanaka Akira <[email protected]> * lib/time.rb (Time.make_time): Refactored. diff --git a/lib/time.rb b/lib/time.rb index 9d4e9cccba..3b928a205f 100644 --- a/lib/time.rb +++ b/lib/time.rb @@ -488,7 +488,7 @@ class Time (\d{2}):(\d{2}):(\d{2})\x20 GMT \s*\z/ix =~ date - self.rfc2822(date) + self.rfc2822(date).utc elsif /\A\s* (?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday),\x20 (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d)\x20 |