Project

General

Profile

Actions

Bug #1972

closed

Changing ENV['TZ'] of a running process should change behavior of Time

Added by shri (Shri Borde) over 14 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
1.9.1p129
Backport:
[ruby-core:25010]

Description

=begin
Running the attached rb1.rb prints "EST AST EST AST" on Mac OS and Linux. But it prints the following output on Windows Vista with 1.8.6p287 as well as 1.9.1p129.

Ame
Asi
Pacific Standard Time
Pacific Standard Time

On non-Windows, the last two lines printed are different from each other. On Windows, they are the same.

Also, while the first two lines are different from each other on both Windows and non-Windows, the results do not match across Windows and non-Windows.
=end


Files

rb1.rb (346 Bytes) rb1.rb shri (Shri Borde), 08/21/2009 08:28 AM
Actions #1

Updated by naruse (Yui NARUSE) over 14 years ago

  • Category set to lib
  • Status changed from Open to Assigned
  • Assignee set to usa (Usaku NAKAMURA)

=begin

=end

Actions #2

Updated by usa (Usaku NAKAMURA) over 14 years ago

=begin
(*** this message is a mere memo. ***)

(1) ruby_setenv() doesn't changes CRT environment workarea.
tzset() sees it, so ENV["TZ"] has no meaning in this case.

(2) localtimexv() doesn't call tzset(). (see its comment)
=end

Actions #3

Updated by usa (Usaku NAKAMURA) over 14 years ago

  • Assignee changed from usa (Usaku NAKAMURA) to akr (Akira Tanaka)

=begin
fixed (1) at r25715.
Any ideas for (2)?
=end

Actions #4

Updated by mame (Yusuke Endoh) almost 14 years ago

  • Status changed from Assigned to Closed

=begin
Hi,

According to Usaku, currently the code produces:

Ame
Asi
Ame
Asi

So this bug is considered fixed already.
I Close this ticket. Thank you!

--
Yusuke Endoh
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0