From: Hassan Schroeder Date: 2013-05-16T00:03:13+09:00 Subject: Re: Help with time On Wed, May 15, 2013 at 7:43 AM, ricardo l. wrote: > If i have a date time like this "2013-04-01T12:01:03-07:00" > > how can i get a Time object in Ruby 2 without UTC added. i mean get > "2013-04-01 12:01:03" 2.0.0 (main):0 > my_datetime = DateTime.now => # 2.0.0 (main):0 > my_datetime.to_time.strftime("%F %H:%m:%S") => "2013-05-15 08:05:03" Note that this only "hides" the UTC offset. If you use this new Time object for comparisons, that's still relevant. -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan