Class Rufus::Scheduler::ZoTime
In: lib/rufus/scheduler/zotime.rb
Parent: Object

Zon{ing|ed}Time, whatever.

Methods

+   -   <   <=   <=>   ==   >   >=   _to_f   add   extract_iso8601_zone   get_tzone   getgm   getutc   inc   is_dst?   isdst   iso8601   local_tzone   make   monthdays   new   now   parse   seconds=   strftime   strfz   substract   to_debug_s   to_f   to_i   to_s   to_time   to_time_s   to_utc_comparison_s   utc   utc_offset   zone=  

Constants

WEEK_S = 7 * 24 * 3600

Attributes

seconds  [R] 
zone  [R] 

Public Class methods

Public Instance methods

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

getgm()

Alias for utc

getutc()

Alias for utc

isdst()

Alias for is_dst?

Returns a Ruby Time instance.

Warning: the timezone of that Time instance will be UTC.

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

Protected Instance methods

def in_zone(&block)

  current_timezone = ENV['TZ']
  ENV['TZ'] = @zone

  block.call

ensure

  ENV['TZ'] = current_timezone

end

[Validate]