Skip to content

1.7.4 Regression: Time::localtime broken #747

@hannesg

Description

@hannesg

Hi

Following problem:

$> rvm jruby-1.7.3 do ruby -e 'puts Time.at(0).localtime("+02:00")' 
1970-01-01 02:00:00 +0200
$> rvm jruby-1.7.4 do ruby -e 'puts Time.at(0).localtime("+02:00")'
ArgumentError: utc_offset out of range
  localtime at org/jruby/RubyTime.java:379
     (root) at -e:1

I nailed the problem down to RubyTime::getTimeZone expecting the timezone to be given as "HH(:MM(:SS))" but RubyTime::localtime supplies the timezone as "'GMT'+HHMM"

Cheers'
Hannes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions