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

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -