I want to use utc+14:00 in my rails app , but
rake time:zones:all
shows up to utc+13:00 only . is there any workaround to use this timezone ?
Rails time zones are a facade around the tzinfo gem , which uses IANA/Olson time zones.
You probably want either the zone "Pacific/Kiritimati"
, which is in UTC+14 all year, or perhaps "Pacific/Apia"
, which is in UTC+13 most of the year and in UTC+14 for daylight saving time.
Read the bottom of the timezone tag wiki about Rails time zones, then take a look at the mapping constant . You'll see that "Pacific/Apia"
is mapped to the Rails name of "Samoa"
, but "Pacific/Kiritimati"
is not in the map.
The best advice I can offer is to use the TzInfo gem directly, and not use Rails time zone "friendly" names.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.