jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-3724

Jruby's "Time.now" output always outputs UTC; doesn't match MRI.

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: JRuby 1.1.5, JRuby 1.1.6, JRuby 1.2, JRuby-OpenSSL 0.4, JRuby-OpenSSL 0.5, JRuby 1.3RC1, JRuby 1.3RC2
  • Fix Version/s: None
  • Component/s: Core Classes/Modules
  • Labels:
    None

Description

(From an email on the jruby list)

14:04:08 ~>ruby -e 'p Time.now'
Sat May 30 14:04:13 -0400 2009

14:04:13 ~>jruby -e 'p Time.now'
Sat May 30 18:04:18 UTC 2009

I'm in the US Eastern time zone, so the following especially seems wrong to me.

14:04:18 ~>jruby -e 'p Time.now.getlocal.gmt?'
true

14:08:03 ~>jruby -e 'p Time.now.getlocal'
Sat May 30 18:08:08 UTC 2009

14:09:49 ~>jruby -e 'p Time.now.localtime'
Sat May 30 18:10:10 UTC 2009

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. JRUBY-2541 Time assumes UTC timezone

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Vladimir Sizikov added a comment - 31/May/09 3:23 AM - edited

Similar issue JRUBY-2541, it seems.

Show
Vladimir Sizikov added a comment - 31/May/09 3:23 AM - edited Similar issue JRUBY-2541, it seems.
Hide
Permalink
Michael Campbell added a comment - 31/May/09 8:52 AM

Duplicate of JRUBY-2541.

As a workaround, setting the "TZ" variable explicitly gets around it.

Show
Michael Campbell added a comment - 31/May/09 8:52 AM Duplicate of JRUBY-2541. As a workaround, setting the "TZ" variable explicitly gets around it.

People

  • Assignee:
    Unassigned
    Reporter:
    Michael Campbell
Vote (0)
Watch (3)

Dates

  • Created:
    30/May/09 6:40 PM
    Updated:
    27/Oct/09 1:49 PM
    Resolved:
    31/May/09 8:52 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.