Class: ReeDatetime::InTimeZone

Inherits:
Object
  • Object
show all
Includes:
Ree::FnDSL
Defined in:
lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/in_time_zone.rb

Instance Method Summary collapse

Instance Method Details

#call(date_time, zone) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/in_time_zone.rb', line 13

def call(date_time, zone)
  new_zone_offset = offset_to_string(
    find_tzinfo(zone).utc_offset
  )
  
  date_time.new_offset(new_zone_offset)
end