Project

General

Profile

Bug #8226

incorrect timezone offset under Solaris 11 x64

Added by John Groenveld almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
ruby -v:
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-solaris2.11]
Backport:
2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
[ruby-core:54051]

Description

US/Eastern is GMT-4, not GMT+4.
DateTime has it back asswards.
I can reproduce with ruby-2.0.0 as well.

$ env PATH=/opt/apache2/ruby-1.9.3/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/solarisstudio12.3/bin ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-solaris2.11]
$ cat date.rb
require 'date'
require 'time'

datetime=DateTime.now.strftime("%a %b %e %T %z %Y")
puts datetime
$ env PATH=/opt/apache2/ruby-1.9.3/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/solarisstudio12.3/bin TZ=US/Eastern ruby date.rb
Fri Apr 5 23:13:22 +04:00 2013
$ env PATH=/opt/apache2/ruby-1.9.3/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/solarisstudio12.3/bin TZ=US/Eastern date +"%a %b %e %T %z %Y"
Fri Apr 5 23:15:30 -0400 2013


Related issues

Duplicates Backport193 - Backport #7868: DateTime.now calculate negative timezone Closed 02/17/2013

History

#1 [ruby-core:54066] Updated by John Groenveld almost 3 years ago

I cannot reproduce with 2.1.0dev from Git.
$ /opt/apache2/ruby-2.1.0/bin/ruby -v
ruby 2.1.0dev (2013-04-07 trunk 40170) [x86_64-solaris2.11]
$ env TZ=US/Eastern /opt/apache2/ruby-2.1.0/bin/ruby date.rb
Sat Apr 6 18:25:07 -0400 2013

John
groenveld@acm.org

#2 [ruby-core:54077] Updated by Heesob Park almost 3 years ago

This bug is a duplicate of bug #7868.
It was already fixed and backported to 2.0.0.

#3 [ruby-core:54101] Updated by John Groenveld almost 3 years ago

phasis68 (Heesob Park) wrote:

This bug is a duplicate of bug #7868.
It was already fixed and backported to 2.0.0.

Thanks!
John
groenveld@acm.org

#4 [ruby-core:54115] Updated by Yui NARUSE almost 3 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF