- Ruby 初心者スレッド Part 56©2ch.net
274 :デフォルトの名無しさん[sage]:2015/01/10(土) 10:08:23.26 ID:YN4LC6Iq - あるべき答えがなにかは知らんが、手元でやってみた。
$ jruby -v jruby 1.7.18 (1.9.3p551) 2014-12-22 625381c on Java HotSpot(TM) 64-Bit Server VM 1.8.0_25-b17 +jit [linux-amd64] ENV['TZ'] = 'US/Pacific' p Time.local(1975, 1, 1).isdst # => true p Time.local(1975, 2, 1).isdst # => true p Time.local(1975, 3, 1).isdst # => true p Time.local(1975, 4, 1).isdst # => true p Time.local(1975, 5, 1).isdst # => true p Time.local(1975, 6, 1).isdst # => true p Time.local(1975, 7, 1).isdst # => true p Time.local(1975, 8, 1).isdst # => true p Time.local(1975, 9, 1).isdst # => true p Time.local(1975, 10, 1).isdst # => true p Time.local(1975, 11, 1).isdst # => true p Time.local(1975, 12, 1).isdst # => true ENV[' TZ '] = nil # 実行結果 false false true true true true true true true true false false
|
|