Project

General

Profile

Actions

Backport #7868

closed

DateTime.now calculate negative timezone

Added by omid.mt (Omid Mehdizadeh) about 11 years ago. Updated about 11 years ago.

Status:
Closed
[ruby-core:52303]

Description

I compiled 1.9.3-p374 on Solaris sparc. I found that the DateTime.now return time by wrong timezone in negative of what it should be. Time.now is OK.

irb(main):002:0> DateTime.now
DateTime.now
=> Sun, 17 Feb 2013 00:50:02 -0330

irb(main):006:0> Time.now
Time.now
=> 2013-02-17 00:28:07 +0330

irb(main):003:0> DateTime.now.zone
d.zone
=> "-03:30"

irb(main):004:0* DateTime.current
DateTime.current
=> Sat, 16 Feb 2013 21:20:28 +0000

This wrong timezone makes Time and DateTime comparison wrong.
As the implementation is in C now, couldn't figure out the logic.


Files

diff (407 Bytes) diff tadf (tadayoshi funaba), 02/18/2013 01:35 AM

Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #8226: incorrect timezone offset under Solaris 11 x64Closed04/06/2013Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0