Project

General

Profile

Actions

Bug #8226

closed

incorrect timezone offset under Solaris 11 x64

Added by groenveld@acm.org (John Groenveld) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-solaris2.11]
Backport:
[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 1 (0 open1 closed)

Is duplicate of Backport193 - Backport #7868: DateTime.now calculate negative timezoneClosedusa (Usaku NAKAMURA)02/17/2013Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0