I am reading the online help guide and it says:
utc_to_local(time) Link Adjust the given time to the simultaneous time
in the time zone represented by self. Returns a Time.utc() instance –
if you want an ActiveSupport::TimeWithZone instance, use
Time#in_time_zone instead.
I know self is like “this” that we have in C# , but not sure how does it apply to Rails and web-apps? ? So does it mean it will look at the browser and browser will look at time zone of the client computer?
selfis the timezone you called this method on.For example:
ActiveSupport::TimeZone.find_tzinfo("America/New_York").utc_to_local(time)It has nothing to do with the browser, it’s server-side.