Project

General

Profile

Bug #1972 ยป rb1.rb

shri (Shri Borde), 08/21/2009 08:28 AM

 
cmd = "puts Time.local(2009).zone"

zones = ['America/New_York5:00:00', 'Asia/Kuwait']
zones.each do |tz|
ENV['TZ'] = tz
puts `ruby -e \"#{cmd}\"` # Prints two different values on Windows
end

zones.each do |tz|
ENV['TZ'] = tz
eval(cmd) # Prints the same value on Windows since changing ENV[?TZ?] on the fly does not work
end
    (1-1/1)