You can use :time data type for your timestamps instead of modifying
casting.rb.
On 4/25/06, Josh <jkahn_117@yahoo.com> wrote:>
> I am trying to implement a web service that returns a datetime stamp as
> part of the structured object returned in the response. As noted in
> another post (http://www.ruby-forum.com/topic/59762), there seems to be
> a problem with the DateTime.parse method in that it does not match the
> year. Is anyone aware of workaround for this issue?
>
> My current idea (a hack, but it seems to work) is to modify the
> AWS/casting.rb module so that casting of datetime stamp is done by the
> Time class instead of DateTime. Essentially, I have changed line 106 to
> read "Time.parse(value.to_s)." This is not a best practice for
sure, so
> I am eagerly in search of another solution.
>
> Thanks.
>
> Josh
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Kent
---
http://www.datanoise.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060426/4a792e12/attachment.html