diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-23 08:03:52 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-23 08:03:52 +0000 |
commit | 3c619fb33ddf4efb147f77b3be34eee17f323873 (patch) | |
tree | 4771c587061dcc9022e10c61f584fb3d297eb039 | |
parent | bcd54b6b6315384badbcea0b6d31f5da72369f2d (diff) | |
download | ruby-3c619fb33ddf4efb147f77b3be34eee17f323873.tar.gz ruby-3c619fb33ddf4efb147f77b3be34eee17f323873.tar.xz ruby-3c619fb33ddf4efb147f77b3be34eee17f323873.zip |
* lib/time.rb (Time.httpdate): use Time.utc for
"day-of-week, dd-mon-yy HH::MM:SS GMT" format.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/time.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sun Dec 23 17:00:23 2007 Tanaka Akira <akr@fsij.org> + + * lib/time.rb (Time.httpdate): use Time.utc for + "day-of-week, dd-mon-yy HH::MM:SS GMT" format. + Sun Dec 23 16:12:40 2007 Eric Hodel <drbrain@segment7.net> * lib/rdoc: Fix 1.9 warnings. diff --git a/lib/time.rb b/lib/time.rb index 301d9b372..0cd900852 100644 --- a/lib/time.rb +++ b/lib/time.rb @@ -338,7 +338,7 @@ class Time (\d\d):(\d\d):(\d\d)\x20 GMT \s*\z/ix =~ date - self.parse(date) + Time.utc(1900+$3.to_i, $2, $1.to_i, $4.to_i, $5.to_i, $6.to_i) elsif /\A\s* (?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)\x20 (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\x20 |