Sha256: c69cf92394639dca6ea530fafee62dacc521a35b37fab1d98e0a963dca572383

Contents?: true

Size: 313 Bytes

Versions: 1

Compression:

Stored size: 313 Bytes

Contents

module Locomotive::Steam
  class Server

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

      def call(env)
        self.set_accessors(env)

        Time.use_zone(site.try(:timezone) || 'UTC') do
          app.call(env)
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
locomotivecms_steam-0.1.0 lib/locomotive/steam/server/timezone.rb