On 7 April 2011 14:08, Mike Disuza <[email protected]> wrote:
> Hi,
> I am using rails 3 for my application.
> My problem is that I am importing the events from meetup.com. I am
> getting the time of the event but I don't know from which time zone.
> E.g. Thu Apr 07 07:00:00 PDT
>
> I want to find out the time zone for it.
> Can anyone tell me how to achieve this?
Is it that you want the timezone, or are you just trying to correctly
interpret the time? If the latter then:
ruby-1.8.7-p302 > Time.parse("Thu Apr 07 07:00:00 PDT").utc
=> Thu Apr 07 14:00:00 UTC 2011
Colin
>
> Thanks,
> Mike
>
> --
> 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 [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.