On Mon, Apr 18, 2011 at 1:11 PM, Michael Pavling <[email protected]> wrote:

> On 18 April 2011 16:38, David Kahn <[email protected]> wrote:
> > Am still perplexed by this output (ruby 1.8.7-p330 on 64bit/Snow
> Leopard):
> >
> > ruby-1.8.7-p330 :001 > DateTime.now
> >  => #<DateTime 2011-04-18T10:35:18-05:00>
> > ruby-1.8.7-p330 :002 > DateTime.now + 1.day
> >  => #<DateTime 2247-11-07T10:35:21-05:00>
>
> I wonder if it's something along the lines of the value of
> DateTime.now expressed as an integer added to 1.day expressed as an
> integer (86400 seconds maybe) converted back to a DateTime - giving a
> date wayyy in the future... :-/
>
> What happens when you do:
>  DateTime.now + 1.second
> or
>  DateTime.now + 1.minute
> etc?
>

Yeah, I am pending to play around with this a bit later, as I am also
recalling that ruby 1.9.2 is fine on my computer, so at least try another
wipe of the 1.8.7. As well see if anything is weird on the config, since as
to your question, it looks like you are on to something:

ruby-1.8.7-p330 :005 > dt = DateTime.now
 => #<DateTime 2011-04-18T13:23:45-05:00>
ruby-1.8.7-p330 :006 > dt + 1.second
 => #<DateTime 2011-04-19T13:23:45-05:00>
ruby-1.8.7-p330 :007 > dt + 1.minute
 => #<DateTime 2011-06-17T13:23:45-05:00>

Because also if I do the following we are right on:

ruby-1.8.7-p330 :008 > dt + 1
 => #<DateTime 2011-04-19T13:23:45-05:00>


>
> ?:-/
> 'fraid I can't help more than this wild speculation though, because I
> have no access to a Mac to test it on.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to