Module: TimeZoneHelper
- Defined in:
- app/helpers/time_zone_helper.rb
Instance Method Summary collapse
- #local_time(time, time_zone = Time.zone.name) ⇒ Object
- #local_time_without_time_zone(time, time_zone = Time.zone.name) ⇒ Object
Instance Method Details
#local_time(time, time_zone = Time.zone.name) ⇒ Object
2 3 4 |
# File 'app/helpers/time_zone_helper.rb', line 2 def local_time(time, time_zone = Time.zone.name) "#{local_time_without_time_zone(time, time_zone)} (#{time_zone})" end |
#local_time_without_time_zone(time, time_zone = Time.zone.name) ⇒ Object
6 7 8 |
# File 'app/helpers/time_zone_helper.rb', line 6 def local_time_without_time_zone(time, time_zone = Time.zone.name) l(time.in_time_zone(time_zone), format: :long) end |