# \[Bug: trunk\] test\_encode\_xmlschema depends upon system's time zone

**URL:** <https://www.ruby-forum.com/t/bug-trunk-test-encode-xmlschema-depends-upon-systems-time-zone/168266>\
**Category:** Development\
**Created:** [May 18, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/bug-trunk-test-encode-xmlschema-depends-upon-systems-time-zone/168266 "2009-05-18T23:12:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zunda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/8797f3/32.png) [@zunda](https://www.ruby-forum.com/u/zunda)\
**Post date:** [May 18, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/bug-trunk-test-encode-xmlschema-depends-upon-systems-time-zone/168266/1 "2009-05-18T23:12:43Z")

</div>

zundae$B$H?=$7$^$9e(B

ruby 1.9.2dev (2009-05-18 trunk 23484) [i686-linux]e$B$G!"e(B  
make test-alle$B$,2\<5-$N$h$&$K\<:GT$7$^$9!#e(B

1. Failure:  
test\_encode\_xmlschema(TestTimeExtention)  
[/home/zunda/local/src/ruby-trunk/test/test\_time.rb:167]:  
\<“1970-01-01T09:00:00.666+09:00”\> expected but was  
\<“1969-12-31T14:00:00.666-10:00”\>.

e$B$3$N%F%9%H$N7k2L$O!"%F%9%H$r\<B9T$7$F$$$k4D6-$N%?%$%`%\>!\<%s$K0MB8e(B  
e$B$7$F$$$k$h$&$G$9!#e(B

e$B\<:GT$9$kNce(B  
$ TZ=HST ./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb  
./runruby.rb --extout=.ext –  
./test/test\_time.rb  
Loaded suite ./test/test\_time  
Started  
…F…  
Finished in 0.035415 seconds.

1. Failure:  
test\_encode\_xmlschema(TestTimeExtention) [./test/test\_time.rb:167]:  
\<“1970-01-01T09:00:00.666+09:00”\> expected but was  
\<“1969-12-31T14:00:00.666-10:00”\>.

21 tests, 195 assertions, 1 failures, 0 errors, 0 skips

e$B@.8y$9$kNce(B  
$ TZ=Japan ./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb  
./runruby.rb --extout=.ext –  
./test/test\_time.rb  
Loaded suite ./test/test\_time  
Started  
…  
Finished in 0.032904 seconds.

21 tests, 205 assertions, 0 failures, 0 errors, 0 skips

e$BNc$($P!"\<j85$G$O2\<5-$N$h$&$JJQ99$G$I$A$i$N\>l9g$b%F%9%H$,@.8y$9$ke(B  
e$B$h$&$K$J$j$^$7$?!#e(B

e$B0J\>e!"$4;29M$^$G!#e(B

# Index: test/test\_time.rb

— test/test\_time.rb (revision 23485)  
+++ test/test\_time.rb (working copy)  
@@ -2,6 +2,15 @@  
require ‘test/unit’

class TestTimeExtention \< Test::Unit::TestCase # :nodoc:

- def setup
- @tzorig = ENV[‘TZ’]
- ENV[‘TZ’] = ‘Japan’
- end
- 
- def teardown
- ENV[‘TZ’] = @tzorig
- end
- def test\_rfc822  
assert\_equal(Time.utc(1976, 8, 26, 14, 30) + 4 \* 3600,  
Time.rfc2822(“26 Aug 76 14:30 EDT”))
