summaryrefslogtreecommitdiff
path: root/spec/ruby/core/time/shared/gmt_offset.rb
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-21 15:38:59 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-21 15:38:59 +0000
commitda7976235fbc2986925969646071bebe3702e49f (patch)
tree83bbf6a8e03cf990369feabe6c1c9d45c69f4c85 /spec/ruby/core/time/shared/gmt_offset.rb
parentb8e389a0f3226c90e96e02e6396686a3bef6a456 (diff)
Update to ruby/spec@7a16e01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/time/shared/gmt_offset.rb')
-rw-r--r--spec/ruby/core/time/shared/gmt_offset.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/time/shared/gmt_offset.rb b/spec/ruby/core/time/shared/gmt_offset.rb
index cb842be2f3..839566c249 100644
--- a/spec/ruby/core/time/shared/gmt_offset.rb
+++ b/spec/ruby/core/time/shared/gmt_offset.rb
@@ -5,6 +5,12 @@ describe :time_gmt_offset, shared: true do
end
end
+ it "returns 0 when the date is UTC" do
+ with_timezone("AST", 3) do
+ Time.new.utc.send(@method).should == 0
+ end
+ end
+
platform_is_not :windows do
it "returns the correct offset for US Eastern time zone around daylight savings time change" do
# "2010-03-14 01:59:59 -0500" + 1 ==> "2010-03-14 03:00:00 -0400"