Skip to content

Commit

Permalink
TimeZone format is always /[+-]\d{2}:\d{2}/ in Ruby 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Jun 11, 2012
1 parent 2eb4ebe commit 73d1046
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def test_native_types
assert_not_equal "Z", bob.moment_of_truth.zone assert_not_equal "Z", bob.moment_of_truth.zone
# US/Eastern is -5 hours from GMT # US/Eastern is -5 hours from GMT
assert_equal Rational(-5, 24), bob.moment_of_truth.offset assert_equal Rational(-5, 24), bob.moment_of_truth.offset
assert_match(/\A-05:?00\Z/, bob.moment_of_truth.zone) #ruby 1.8.6 uses HH:MM, prior versions use HHMM assert_match(/\A-05:00\Z/, bob.moment_of_truth.zone)
assert_equal DateTime::ITALY, bob.moment_of_truth.start assert_equal DateTime::ITALY, bob.moment_of_truth.start
end end
end end
Expand Down

0 comments on commit 73d1046

Please sign in to comment.