Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想显示用户的时区。
@user.time_zone will display the city name "Brussels"
我怎么能像这样获得 GMT 的完整时区:
(GMT+01:00) Brussels
我终于找到了诀窍
ActiveSupport::TimeZone[@user.time_zone]
显示完整的用户时区