From: Bertram Scharpf Date: 2009-09-17T03:46:43+09:00 Subject: Re: import utc in Time Hi, Am Donnerstag, 17. Sep 2009, 01:12:30 +0900 schrieb Luca Roma: > Hi, i'm using facebooker for receiving facebook's events. > I receive the time of the event in utc format. > > how can i import it in a Time object > > in other words > > a= Time.now.utc > > how can i import a in a Time object?? > > this not works > Time.parse(a) UTC is a time zone, not a format. You need to load "time.rb". t = Time.now str_l = t.to_s t.utc str_u = t.to_s require "time" q = Time.parse str_l puts q q = Time.parse str_u puts q Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de