Module: Kernel

Defined in:
lib/mark_facets/rails/time_zones.rb

Instance Method Summary collapse

Instance Method Details

#with_time_zone(zone, &block) ⇒ Object



21
22
23
24
25
26
27
28
29
# File 'lib/mark_facets/rails/time_zones.rb', line 21

def with_time_zone(zone, &block)
  orig_tz = Time.zone
  begin
    Time.zone = zone
    yield
  ensure
    Time.zone = orig_tz
  end
end