From: "phasis68 (Heesob Park)" Date: 2012-06-11T14:20:36+09:00 Subject: [ruby-core:45559] [ruby-trunk - Bug #6571] Time.mktime Y2K38 problem on 1.9.3p125 i386-mingw32 Issue #6571 has been updated by phasis68 (Heesob Park). I guess it is not an issue of Time#mktime but an issue of OpenSSL. Furthermore, the description is inaccurate. Here is my test with ruby 1.9.3p194 (2012-04-20) [i386-mingw32] C:\Ruby193\bin>irb irb(main):001:0> require 'OpenSSL' => true irb(main):002:0> cert = OpenSSL::X509::Certificate.new => # irb(main):003:0> cert.not_after = Time.mktime(2038, 1, 19, 12, 14, 7) => 2038-01-19 12:14:07 +0900 irb(main):004:0> cert.not_after = Time.mktime(2038, 1, 19, 12, 14, 8) RangeError: bignum too big to convert into `long' from (irb):4:in `not_after=' from (irb):4 from C:/Ruby193/bin/irb:12:in `
' I think that this error due to time_to_time_t function defined in ext/openssl/ossl_asn1.c time_t time_to_time_t(VALUE time) { return (time_t)NUM2LONG(rb_Integer(time)); } ---------------------------------------- Bug #6571: Time.mktime Y2K38 problem on 1.9.3p125 i386-mingw32 https://bugs.ruby-lang.org/issues/6571#change-27156 Author: MartinBosslet (Martin Bosslet) Status: Feedback Priority: Normal Assignee: luislavena (Luis Lavena) Category: core Target version: 1.9.3 ruby -v: ruby 1.9.3p125 (2012-02-16) [i386-mingw32] =begin This came up in https://bugs.ruby-lang.org/issues/6122. (({Time.mktime(2038, 1, 19, 11, 14, 8)})) failed. To my understanding, 32 bit Time issues shouldn't occur in 1.9.3? I'm assigning this to Luis, maybe he knows about this and what to do? Please feel free to reassign back to me. =end -- http://bugs.ruby-lang.org/