Hi
Ideally, Time.parse on your payment_date string should work.
No idea why ActiveMerchant is failing.
Try parsing using strptime -
existing_format = "%H:%M:%S %b %d, %Y %Z"
d=Datetime.strptime(payment_date,existing_format)
- neeti
On Sep 1, 5:13 am, giorgio
<george.pever...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi,
> I am getting a date back from PayPal and it is being processed by
> ActiveMerchant
> The date comes back as:
> "payment_date"=>"16:36:26 Aug 31, 2008 PDT"
>
> This throws an argument out of range when ActiveMerchant does a
> Time.parse on it.
>
> I notice that>> Time.parse("Aug 31, 16:36:26 2008 PDT")
>
> works ok.
>
> Is there any way that I work with the date in the order with time
> first?
>
> Cheers
> George
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
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
-~----------~----~----~----~------~----~------~--~---