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?
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?
Sorry, isn’t “PDT” Pacific Daylight Time? If this is an example of the
time strings you’re grabbing from Meetup, it seems like you could do a
regular expression to grab everything after the last number in the
time string and perform some lookups from there, right?
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.