F. Senault
6/30/2008 6:43:00 PM
Le 30 juin à 20:12, Dany a écrit :
> But as the output shows, the value is 'frozen' in that library. I am
> looking for ideas how to workaround my issue. Any help appreciated.
> BTW, I'm not a programmer and I have not done much with Ruby, yet.
Why don't you change the timezone in the sting beforehand ?
Something like :
>> date='Fri Jun 20 02:32:28 GST 2008'
=> "Fri Jun 20 02:32:28 GST 2008"
>> DateTime.parse(date.gsub(' GST ', ' UTC+04 ')).zone
=> "+04:00"
Of course, if you need to pase many dates at many points, you can either
redefine your own parsing routine (def DateTime.myparse(...)), or even
patch the DateTime.parse function with via alias and a new definition...
The only relative downside is that it will be a bit slower.
Fred
--
You always were the one to show me how Back then I couldn't do the
things that I can do now This thing is slowly taking me apart Grey
would be the color if I had a heart Come on tell me
(Nine Inch Nais, Something I Can Never Have)