summaryrefslogtreecommitdiff
path: root/test/ruby/test_time_tz.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-07 06:59:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-07 06:59:46 +0000
commit4f9ab3a01a475f5236632575fa4d3a6b6aef7d15 (patch)
treedb56fb9849f1b066f1730399db0dcf88db5580f7 /test/ruby/test_time_tz.rb
parentda1f9199bd659f6277d53cc41f6007911fb3a9c5 (diff)
time.c: UTC and Z timezones should be utc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_time_tz.rb')
-rw-r--r--test/ruby/test_time_tz.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb
index 8e60cf44c5..ec5c9a2dbe 100644
--- a/test/ruby/test_time_tz.rb
+++ b/test/ruby/test_time_tz.rb
@@ -254,6 +254,12 @@ class TestTimeTZ < Test::Unit::TestCase
}
end if has_right_tz
+ def test_utc_names
+ assert_predicate(Time.new(2019, 1, 1, 0, 0, 0, "UTC"), :utc?)
+ assert_predicate(Time.new(2019, 1, 1, 0, 0, 0, "utc"), :utc?)
+ assert_predicate(Time.new(2019, 1, 1, 0, 0, 0, "Z"), :utc?)
+ end
+
MON2NUM = {
"Jan" => 1, "Feb" => 2, "Mar" => 3, "Apr" => 4, "May" => 5, "Jun" => 6,
"Jul" => 7, "Aug" => 8, "Sep" => 9, "Oct" => 10, "Nov" => 11, "Dec" => 12