Permalink
Browse files

always return Time objects even if it means losing time zone informat…

…ion (for now)
  • Loading branch information...
DerGuteMoritz committed Sep 8, 2010
1 parent 1d65055 commit 5ff1af7040786741a3740d596cbe2f03abae545b
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/whois/answer/parser/whois.co.ug.rb
  2. +1 −1 test/whois/answer/parser/whois.co.ug_test.rb
@@ -54,7 +54,7 @@ class WhoisCoUg < Base
property_supported :updated_on do
@updated_on ||= if content_for_scanner =~ /Updated:\s+(.+)$/
- DateTime.strptime($1, '%d/%m/%Y %H:%M:%S %Z')
+ DateTime.strptime($1, '%d/%m/%Y %H:%M:%S').to_time
end
end
@@ -46,7 +46,7 @@ def test_created_on
def test_updated_on
parser = @klass.new(load_part('/registered.txt'))
- expected = DateTime.new(2009, 11, 10, 14, 6, 58, 'EAT')
+ expected = Time.gm(2009, 11, 10, 14, 6, 58)
assert_equal expected, parser.updated_on
assert_equal expected, parser.instance_eval { @updated_on }

0 comments on commit 5ff1af7

Please sign in to comment.