Colin Law wrote in post #1065800:
>> What is the class of found?
I updated the above mentioned gist. 'expected' is a DateTme, 'found' is
ActiveSupport::TimeWithZone.
> Also I don't think you have told us which versions of ruby and rails
> you are using.
Apologies, this was buried at the end of the OP:
>PS: I'm using postgresql with Ruby 1.93 and Rails 3.2.1
But this is all now moot: I posted this as a Rails issue:
https://github.com/rails/rails/issues/6814
where @pixeltrix patiently educated me on the anomalies of ancient
calendar systems. The best line was "[calendar reforms] can lead to
oddities like William Shakespeare and Miguel de Cervantes dying on the
same date but 10 days apart." He also suggests using #gregorian to
adjust the datetime before converting to time, e.g:
>> DateTime.jd(2000000).gregorian
=> Wed, 18 Sep 0763 00:00:00 +0000
So: not a bug. Just a reality of calendar reforms.
--
Posted via http://www.ruby-forum.com/.
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment