From: Brian Candler Date: 2010-06-12T18:08:24+09:00 Subject: Re: DateTime about the zone Une B辿vue wrote: > i'm reading a news server from ruby asking for DATE, it returns : > "20100612" for the date, that's ok for today > and : > "073429" for the time when it is 2 hours more You mean it's 093429 local time in France? That means that 073429 is UTC. >> datetime = DateTime.parse('2010-06-12T07:34:29') => # I don't know how to ask a DateTime to change to the local timezone, but I can do it with Time: >> require 'time' => true >> time = Time.parse('2010-06-12T07:34:29Z') => Sat Jun 12 07:34:29 UTC 2010 >> time.to_s => "Sat Jun 12 07:34:29 UTC 2010" >> time.getlocal => Sat Jun 12 08:34:29 +0100 2010 -- Posted via http://www.ruby-forum.com/.