Class: Locomotive::Steam::Middlewares::Timezone
- Inherits:
-
ThreadSafe
- Object
- ThreadSafe
- Locomotive::Steam::Middlewares::Timezone
- Includes:
- Helpers
- Defined in:
- lib/locomotive/steam/middlewares/timezone.rb
Overview
Set the timezone according to the settings of the site
Instance Attribute Summary
Attributes inherited from ThreadSafe
Instance Method Summary collapse
Methods included from Helpers
#decorate_entry, #default_liquid_context, #default_locale, #html?, #json?, #liquid_assigns, #live_editing?, #locale, #locales, #log, #make_local_path, #modify_path, #mounted_on, #page, #params, #path, #redirect_to, #render_response, #repositories, #request, #services, #site
Methods inherited from ThreadSafe
Instance Method Details
#_call ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/locomotive/steam/middlewares/timezone.rb', line 10 def _call timezone = site.try(:timezone) log "Timezone: #{timezone.name}" Time.use_zone(timezone) do self.next end end |