Needs to create a Rails App where I want to get the time in local time Zone i.e. if the location is Delhi the time zone should be IST and if the the location is San Fransisco the time zone should be PDT.
How to accomplish this in ruby on rails?
P.S. One line code that can set the time zone automatically according to the location.
try this
Time.now.getlocal.zone