Sha256: 89d44b676291bb7f8fa735300bb49ea13f62a73cd0c6b21c30e9f33cce917565
Contents?: true
Size: 438 Bytes
Versions: 29
Compression:
Stored size: 438 Bytes
Contents
# frozen_string_literal: true module Facter module Resolvers class Timezone < BaseResolver @semaphore = Mutex.new @fact_list ||= {} class << self private def post_resolve(fact_name) @fact_list.fetch(fact_name) { determine_timezone } end def determine_timezone @fact_list[:timezone] = Time.now.localtime.strftime('%Z') end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems