struct

ActiveSupport::TimeWithZone

Inherits Struct < Value < Object

Constructors

new(time : Time, zone : TimeZone)
Source

Class methods

format_offset(offset : Int32, colon : Bool = true) : String
Source

Instance methods

+(other : Time::Span) : TimeWithZone
Source
+(seconds : Int | Float) : TimeWithZone
Source
-(other : TimeWithZone) : Float64

TimeWithZone - TimeWithZone → seconds between the UTC instants.

Source
-(other : Time::Span) : TimeWithZone
Source
-(seconds : Int | Float) : TimeWithZone
Source
<=>(other : TimeWithZone) : Int32
Source
<=>(other : Time) : Int32
Source
==(other : TimeWithZone) : Bool
Source
==(other : Time) : Bool
Source
ago(seconds : Int | Float) : TimeWithZone
Source
formatted_offset(colon : Bool = true) : String
Source
in_time_zone(name : String | TimeZone | Nil = nil) : TimeWithZone
Source
localtime
Source
since(seconds : Int | Float) : TimeWithZone
Source
strftime(format : String) : String

strftime on the zoned (wall-clock) time, like Rails (offset-aware).

Source
time
Source
time_zone

Rails name for the zone getter (TimeZone object).

Source
to_formatted_s(format : Symbol = :default) : String
Source
to_fs(format : Symbol = :default) : String
Source
to_fs(format : String) : String
Source
to_s

Ruby Time#to_s lookalike: wall clock + offset ("+0100"/"UTC").

Source
utc_offset
Source
zone