Class EtOrbi::EoTime
In: lib/et-orbi/eo_time.rb
Parent: Object

Our EoTime class (which quacks like a ::Time).

An EoTime instance should respond to most of the methods ::Time instances respond to. If a method is missing, feel free to open an issue to ask (politely) for it. If it makes sense, it‘ll get added, else a workaround will get suggested. The immediate workaround is to call to_t on the EoTime instance to get equivalent ::Time instance in the local, current, timezone.

Methods

+   -   <   <=   <=>   ==   >   >=   _to_f   add   ambiguous?   count_weeks   get_tzone   getgm   getutc   inc   is_dst?   isdst   iso8601   local   local_tzone   localtime   make   monthdays   new   now   parse   platform_info   reach   seconds=   strftime   strfz   subtract   to_debug_s   to_f   to_i   to_local_time   to_s   to_t   to_time   to_time_s   to_utc_comparison_s   to_utc_time   to_zs   translate   utc   utc   utc?   utc_offset   wday_in_month   zone=  

Constants

WEEK_S = 7 * 24 * 3600

Attributes

seconds  [R]  instance methods
zone  [R] 

Public Class methods

Public Instance methods

alias eql? == # FIXME see Object#== (ri)

Returns true if this EoTime instance corresponds to 2 different UTC times. It happens when transitioning from DST to winter time.

www.timeanddate.com/time/change/usa/new-york?year=2018

getgm()

Alias for utc

getutc()

Alias for utc

isdst()

Alias for is_dst?

Returns this ::EtOrbi::EoTime as a ::Time instance in the current timezone.

Has a to_t alias.

to_t()

Alias for to_local_time

Debug current time by showing local time / delta / utc time for example: "0120-7(0820)"

to_utc_time()

Alias for utc

translate(zone=nil)

Alias for localtime

Returns this ::EtOrbi::EoTime as a ::Time instance in the current UTC timezone.

Returns true if this ::EtOrbi::EoTime instance timezone is UTC. Returns false else.

Protected Instance methods

Returns a Ruby Time instance.

Warning: the timezone of that Time instance will be UTC when used with TZInfo < 2.0.0.

[Validate]