Sha256: 02d337b9126a974971866baaef8b2cf41fd495d77f64c542f7caffc29690d147

Contents?: true

Size: 374 Bytes

Versions: 11

Compression:

Stored size: 374 Bytes

Contents

module Locomotive::Steam
  module Middlewares

    # Set the timezone according to the settings of the site
    #
    class Timezone < ThreadSafe

      include Concerns::Helpers

      def _call
        timezone = site.try(:timezone)

        log "Timezone: #{timezone.name}"

        Time.use_zone(timezone) do
          self.next
        end
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
locomotivecms_steam-1.6.0.rc1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.6.0.beta1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.5.3 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.5.2 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.5.1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.5.0 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.5.0.rc1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.5.0.rc0 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.5.0.beta3 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.5.0.beta2 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.5.0.beta1 lib/locomotive/steam/middlewares/timezone.rb