ActiveSupport::TimeWithZone

class ActiveSupport::TimeWithZone

Parent:
Object
Included modules:
DateAndTime::Compatibility

A Time-like class that can represent a time in any time zone. Necessary because standard Ruby Time instances are limited to UTC and the system's ENV['TZ'] zone.

You shouldn't ever need to create a TimeWithZone instance directly via new. Instead use methods local, parse, at and now on TimeZone instances, and in_time_zone on Time and DateTime instances.

登录查看完整内容