# File lib/et-orbi.rb, line 270
    def determine_local_tzone

      # ENV has the priority

      etz = ENV['TZ']

      tz = etz && get_tzone(etz)
      return tz if tz

      # then Rails/ActiveSupport has the priority

      if Time.respond_to?(:zone) && Time.zone.respond_to?(:tzinfo)
        tz = Time.zone.tzinfo
        return tz if tz
      end

      # then the operating system is queried

      tz = ::TZInfo::Timezone.get(os_tz) rescue nil
      return tz if tz

      # then Ruby's time zone abbs are looked at CST, JST, CEST, ... :-(

      tzs = determine_local_tzones
      tz = (etz && tzs.find { |z| z.name == etz }) || tzs.first
      return tz if tz

      # then, fall back to GMT offest :-(

      n = Time.now

      get_tzone(n.zone) ||
      get_tzone(n.strftime('%Z%z'))
    end