Issue #9119 has been updated by phasis68 (Heesob Park).

File patch added

After applying above patch, TestTime#test_marshal_broken_offset test passes.
But TestTime#test_marshal_zone test fails on UTC-5 timezone.

I inspected this issue and found that it is a mingw 32-bit compiler specific issue.
The MSVC and MINGW64 compiler calls _gmtime64_s and _localtime64_s crt function for localtime_r implementation.
The other compiler calls FileTimeToSystemTime API function which ignores TZ environment variable.

I made a patch for timezone related test.


----------------------------------------
Bug #9119: TestTime#test_marshal_broken_offset broken under MinGW
https://bugs.ruby-lang.org/issues/9119#change-43142

Author: luislavena (Luis Lavena)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: test
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev (2013-11-17 trunk 43698) [i386-mingw32] ruby 2.0.0p350 (2013-11-13 revision 43661) [i386-mingw32]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


=begin
Hello,

The test (({TestTime#test_marshal_broken_offset})) has been broken under x86-mingw32 for really long time, in both 2.0 and trunk:

http://ci.rubyinstaller.org/job/ruby-2_0_0-x86-test-all/170/console

http://ci.rubyinstaller.org/job/ruby-trunk-x86-test-all/2362/console

 TestTime#test_marshal_broken_offset [C:/Users/Worker/Jenkins/workspace/ruby-trunk-x86-build/test/ruby/test_time.rb:331]:
 <0> expected but was
 <-10800>.
=end


-- 
http://bugs.ruby-lang.org/