Sha256: e6f6bcb76058c8aed7fe3d5e9b46e0c7d1b39906950e7e826115ff2409e263de
Contents?: true
Size: 409 Bytes
Versions: 8
Compression:
Stored size: 409 Bytes
Contents
# frozen_string_literal: true module Facter module Resolvers class Timezone < BaseResolver @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
8 entries across 8 versions & 1 rubygems