datetime - Convert utc time to system current time using ruby -
how convert utc time current system using ruby?
i'm using time.now.utc.iso8601 utc format in ruby, want convert system current time using ruby.
can me sample code?
the ruby time class has getlocal method:
t = time.now.utc => 2015-03-21 00:29:47 utc t.getlocal => 2015-03-20 20:29:47 -0400 see here: http://ruby-doc.org/core-2.2.0/time.html#method-c-local
Comments
Post a Comment