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.0.1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.rc10 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.rc9 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.rc8 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.rc6 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.rc4 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.rc3 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.rc2 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.rc1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.pre.beta.3 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.pre.beta.2 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.pre.beta.1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.pre.alpha.3 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.pre.alpha.2 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.pre.alpha.1 lib/locomotive/steam/middlewares/timezone.rb
locomotivecms_steam-1.0.0.pre.alpha lib/locomotive/steam/middlewares/timezone.rb