Sha256: a8eaf7175d970229edd2495e96ea8b936e6f632ee754694fbd751b5c30beee41

Contents?: true

Size: 364 Bytes

Versions: 37

Compression:

Stored size: 364 Bytes

Contents

module Locomotive::Steam
  module Middlewares

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

      include 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

37 entries across 37 versions & 1 rubygems

Version Path
locomotivecms_steam-1.4.1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.4.0 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.4.0.rc2 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.4.0.rc1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.4.0.pre.rc.1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.3.0 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.3.0.rc2 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.1.2 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.2.1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.3.0.rc1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.2.0 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.2.0.rc3 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.2.0.rc2 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.2.0.rc1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.2.0.beta1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.1.1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.1.0 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.1.0.rc3 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.1.0.rc2 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.1.0.rc1 lib/locomotive/steam/middlewares/timezone.rb