From: Dany Date: 2008-07-01T04:42:19+09:00 Subject: Re: working around frozen hash > > 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" Because that is too easy and makes too much sense ;-) I did not know about UTC+04 format. That is simple and easy to understand what is going on. I am not too concern with performance, at this point. Thanks! > > 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... > My thoughts were going into that direction... but I burned myself going down a similar path for another 'library' before. I didn't understand enough what I was 'patching' and my fix only cover some specific cases, for me, but broke other.... I also don't like to mess around with any code related to time and date. I thought my idea of just changing a 'constant' in the library, was the less 'intrusive' way to not change any code 'logic'. Thanks again Dany