From: Jarmo Pertman on
Hello.

I just installed Ruby 1.8.6 from source and then stumbled upon the
following problem. Any ideas what might be causing this incorrect
behaviour?

jarmo(a)jarmo-laptop:~$ uname -a
Linux jarmo-laptop 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:27:30
UTC 2010 i686 GNU/Linux
jarmo(a)jarmo-laptop:~$ date
Sat May 29 18:46:18 EEST 2010
jarmo(a)jarmo-laptop:~$ ruby -v
ruby 1.8.6 (2010-02-05 patchlevel 399) [i686-linux]
jarmo(a)jarmo-laptop:~$ ruby -e "require 'date'; puts Date.today"
2060--1-9785

Jarmo
--
Posted via http://www.ruby-forum.com/.

From: Jarmo Pertman on
Time.now works correctly
jarmo(a)jarmo-laptop:~/Downloads/ruby-1.8.6-p287$ ruby -e "require 'date';
puts Date.today; puts Time.now"
2060--1-9785
Sat May 29 21:59:11 +0300 2010

Jarmo

Jarmo Pertman wrote:
> Hello.
>
> I just installed Ruby 1.8.6 from source and then stumbled upon the
> following problem. Any ideas what might be causing this incorrect
> behaviour?
>
> jarmo(a)jarmo-laptop:~$ uname -a
> Linux jarmo-laptop 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:27:30
> UTC 2010 i686 GNU/Linux
> jarmo(a)jarmo-laptop:~$ date
> Sat May 29 18:46:18 EEST 2010
> jarmo(a)jarmo-laptop:~$ ruby -v
> ruby 1.8.6 (2010-02-05 patchlevel 399) [i686-linux]
> jarmo(a)jarmo-laptop:~$ ruby -e "require 'date'; puts Date.today"
> 2060--1-9785
>
> Jarmo

--
Posted via http://www.ruby-forum.com/.

From: Jarmo Pertman on
Also, found one very similar problem, but no solutions...

http://stackoverflow.com/questions/2154281/wrong-date-with-ruby-date-today-and-datetime-now

I even tried 1.8.6 older patchlevels... I need 1.8.6 and not 1.8.7 nor
1.9.1.

Jarmo
--
Posted via http://www.ruby-forum.com/.

From: Kirk Haines on
On Sat, May 29, 2010 at 1:03 PM, Jarmo Pertman <jarmo.p(a)gmail.com> wrote:
> Also, found one very similar problem, but no solutions...
>
> http://stackoverflow.com/questions/2154281/wrong-date-with-ruby-date-today-and-datetime-now
>
> I even tried 1.8.6 older patchlevels... I need 1.8.6 and not 1.8.7 nor
> 1.9.1.

I'm not able to reproduce this. However, what version of GCC did you
use to build it?


Kirk Haines

From: Jarmo Pertman on
jarmo(a)jarmo-laptop:~/Downloads$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --enable-multiarch --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4
--program-suffix=-4.4 --enable-nls --enable-clocale=gnu
--enable-libstdcxx-debug --enable-plugin --enable-objc-gc
--enable-targets=all --disable-werror --with-arch-32=i486
--with-tune=generic --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)

And i compiled Ruby with ./configure && make && sudo make install

Jarmo


Kirk Haines wrote:
> On Sat, May 29, 2010 at 1:03 PM, Jarmo Pertman <jarmo.p(a)gmail.com>
> wrote:
>> Also, found one very similar problem, but no solutions...
>>
>> http://stackoverflow.com/questions/2154281/wrong-date-with-ruby-date-today-and-datetime-now
>>
>> I even tried 1.8.6 older patchlevels... I need 1.8.6 and not 1.8.7 nor
>> 1.9.1.
>
> I'm not able to reproduce this. However, what version of GCC did you
> use to build it?
>
>
> Kirk Haines

--
Posted via http://www.ruby-forum.com/.