Skip to content

BC Date (with ActiveSupport) regression #652

@kares

Description

@kares

I've been just hit by this while testing AR-JDBC (BC Date) support and seems to me like a JRuby 1.7.3 issue, affecting mostly --1.9 mode, I've only managed to reproduce with ActiveSupport (3.2.13) loaded so far (my local TZ is +0100) :

1.7.3 --1.9 wrong BC Date: 1753-08-29 22:43:40 +0057

>> JRUBY_VERSION
=> "1.7.3"
>> RUBY_VERSION
=> "1.9.3"
require 'active_support/all'
=> true
>> ActiveSupport::VERSION::STRING
=> "3.2.13"
Date.new(0) - 1.second
=> 1753-08-29 22:43:40 +0057

1.7.3 --1.8 correct

>> JRUBY_VERSION
=> "1.7.3"
>> RUBY_VERSION
=> "1.8.7"
require 'active_support/all'
=> true
>> ActiveSupport::VERSION::STRING
=> "3.2.13"
Date.new(0) - 1.second
=> Wed, 31 Dec -0001 23:59:59 +0100

1.6.8 --1.9 seems to work "better" (although there's the suspicious +0057 part)

>> JRUBY_VERSION
=> "1.6.8"
>> RUBY_VERSION
=> "1.9.2"
>> require 'active_support/all'
=> true
>> ActiveSupport::VERSION::STRING
=> "3.2.13"
>> Date.new(0) - 1.second
=> -0001-12-31 23:59:59 +0057

MRI 1.9.3 to be complete

>> require 'active_support/all'
=> true
>> RUBY_VERSION
=> "1.9.3"
>> ActiveSupport::VERSION::STRING
=> "3.2.13"
>> Date.new(0)
=> Thu, 01 Jan 0000
>> Date.new(0) - 1.second
=> -0001-12-31 23:59:59 +0100

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