diff options
-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 |