mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/test_time.rb: make tests timezone independent.
reported by zunda. [ruby-dev:38492] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5a83cfaef5
commit
cef83891ca
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue May 19 07:52:05 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/test_time.rb: make tests timezone independent.
|
||||
reported by zunda. [ruby-dev:38492]
|
||||
|
||||
Mon May 18 21:40:11 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* lib/pathname.rb (Pathname#sub): suppress a warning. [ruby-dev:38488]
|
||||
|
|
|
@ -163,12 +163,12 @@ class TestTimeExtention < Test::Unit::TestCase # :nodoc:
|
|||
assert_equal("2001-04-17T19:23:17.12345Z", t.xmlschema(5))
|
||||
assert_equal("2001-04-17T19:23:17.1Z", t.xmlschema(1))
|
||||
|
||||
t = Time.at(2.quo(3))
|
||||
t = Time.at(2.quo(3)).getlocal("+09:00")
|
||||
assert_equal("1970-01-01T09:00:00.666+09:00", t.xmlschema(3))
|
||||
assert_equal("1970-01-01T09:00:00.6666666666+09:00", t.xmlschema(10))
|
||||
assert_equal("1970-01-01T09:00:00.66666666666666666666+09:00", t.xmlschema(20))
|
||||
|
||||
t = Time.at(123456789.quo(9999999999))
|
||||
t = Time.at(123456789.quo(9999999999)).getlocal("+09:00")
|
||||
assert_equal("1970-01-01T09:00:00.012+09:00", t.xmlschema(3))
|
||||
assert_equal("1970-01-01T09:00:00.012345678+09:00", t.xmlschema(9))
|
||||
assert_equal("1970-01-01T09:00:00.0123456789+09:00", t.xmlschema(10))
|
||||
|
|
Loading…
Reference in a new issue