@time = Time.now
if @time.zone == "IST"
@time = Time.now.utc
end
i tried the above code, and it works for me. but how to change the time according to the country when the application is opened in some other country.
i.e., If the application is opened in PDT it should show time in PDT format when the same application is opened in UTC it should show time in UTC format by checking the zone automatically. How to apply this for all the timezone in ruby?
i have tried checking for one timezone, how to do it for all the timezone!!
Is there any gem?
Thanks..