Hi,

Please, try it:

DateTime.parse("2010-03-31T07:47:46 -500").to_s

On 1 апр, 01:22, Sav <savar...@gmail.com> wrote:
> Can someone help me format the following date into a db-friendly
> datetime value?
>
> Here is the date I get from an XML file...
> xmldate = "2010-03-31T07:47:46 -500"
>
> But xmldate.to_datetime isn't handling the timezone...
> 2010-03-31T07:47:46+00:00
>
> Any ideas how I get to this?...
> 2010-03-31T07:47:46-05:00

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to