user5966924
user5966924

Reputation:

How to see UTC time using ruby on rails

I have been using this for Time.now for fetching current time. But this shows current time as per my country. Now I want to see current time according to UTC How do I do that in ruby.

Upvotes: 1

Views: 65

Answers (1)

techdreams
techdreams

Reputation: 5585

It's simple. Just use

Time.now.utc

Upvotes: 3

Related Questions