mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) 63823,63839: [Backport #14890]
time.c: [DOC] Time#localtime * time.c: state that Time#localtime does nothing when nothing changes. [ruby-core:87675] [Bug #14880] skip test_localtime_zone if force_tz_test is false For example Solaris https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180703T091803Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@66780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0e0d0c47b8
commit
4f0899d4bb
4 changed files with 29 additions and 1 deletions
|
@ -90,6 +90,19 @@ describe "Time#localtime" do
|
|||
|
||||
t.utc_offset.should == -18000
|
||||
end
|
||||
|
||||
it "does nothing if already in a local time zone" do
|
||||
time = with_timezone("America/New_York") do
|
||||
break Time.new(2005, 2, 27, 22, 50, 0)
|
||||
end
|
||||
zone = time.zone
|
||||
|
||||
with_timezone("Europe/Amsterdam") do
|
||||
time.localtime
|
||||
end
|
||||
|
||||
time.zone.should == zone
|
||||
end
|
||||
end
|
||||
|
||||
describe "with an argument that responds to #to_str" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue