From 736d492a254df953c5e685b621105fbd4bf578d6 Mon Sep 17 00:00:00 2001 From: jeg2 Date: Wed, 24 Oct 2007 21:24:09 +0000 Subject: * lib/xmlrpc/parser.rb (XMLRPC::Convert::dateTime): Fixing a bug that caused time zone conversion to fail for some ISO 8601 date formats. [ruby-Bugs-12677] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/xmlrpc/parser.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/xmlrpc/parser.rb b/lib/xmlrpc/parser.rb index d27d7c382..6d10fde9d 100644 --- a/lib/xmlrpc/parser.rb +++ b/lib/xmlrpc/parser.rb @@ -92,7 +92,7 @@ module XMLRPC if $7 ofs = $8.to_i*3600 + $9.to_i*60 ofs = -ofs if $7=='+' - utc = Time.utc(a.reverse) + ofs + utc = Time.utc(*a) + ofs a = [ utc.year, utc.month, utc.day, utc.hour, utc.min, utc.sec ] end XMLRPC::DateTime.new(*a) @@ -106,7 +106,7 @@ module XMLRPC if $7 ofs = $8.to_i*3600 + $9.to_i*60 ofs = -ofs if $7=='+' - utc = Time.utc(a.reverse) + ofs + utc = Time.utc(*a) + ofs a = [ utc.year, utc.month, utc.day, utc.hour, utc.min, utc.sec ] end XMLRPC::DateTime.new(*a) -- cgit