ActiveSupport::TimeZone
class ActiveSupport::TimeZone
The TimeZone class serves as a wrapper around TZInfo::Timezone instances. It allows us to do the following:
-
Limit the set of zones provided by TZInfo to a meaningful subset of 146 zones.
-
Retrieve and display zones with a friendlier name (e.g., “Eastern Time (US & Canada)” instead of “America/New_York”).
-
Lazily load TZInfo::Timezone instances only when they're needed.
-
Create ActiveSupport::TimeWithZone instances via TimeZone's
local
,parse
,at
andnow
methods.
If you set config.ti