mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/psych/visitors/test_to_ruby.rb (test_time): time test must
respect non-whole timezone. Thanks akr! [ruby-core:31061] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bb7b62af8d
commit
13f5a607fb
1 changed files with 3 additions and 1 deletions
|
@ -113,7 +113,9 @@ description:
|
|||
def test_time
|
||||
now = Time.now
|
||||
formatted = now.strftime("%Y-%m-%d %H:%M:%S") +
|
||||
".%09d %+.2d:00" % [now.nsec, now.gmt_offset / 3600]
|
||||
".%09d %+.2d:%2d" % [ now.nsec,
|
||||
now.gmt_offset / 3600,
|
||||
now.gmt_offset % 3600 / 60]
|
||||
|
||||
assert_equal now, Nodes::Scalar.new(formatted).to_ruby
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue