def local_to_utc(time)
      time = sanitize(time)

      (time - rule_for_local(time).rules.first[OFFSET_BIT]).utc
    end
def local_to_utc(time)
      time = sanitize(time)

      (time - rule_for_local(time).rules.first[OFFSET_BIT]).utc
    end
Converts the given local time to the UTC equivalent.

 @param time [#to_time] the local time
 @return [Time] the time in UTC

 @note The UTC equivalent is a "best guess". There are cases where
   local times do not map to UTC at all (during a time skip forward).
   There are also cases where local times map to two distinct UTC
   times (during a fall back). All of these cases are approximated
   in this method and the first possible result is used instead.

 @note A note about the handling of time arguments.

   Because the UTC offset of a `Time` object in Ruby is not
   equivalent to a single timezone, the `time` argument in this
   method is first converted to a UTC equivalent before being
   used as a local time.

   This prevents confusion between historical UTC offsets and the UTC
   offset that the `Time` object provides. For instance, if I pass
   a "local" time with offset `+8` but the timezone actually had
   an offset of `+9` at the given historical time, there is an
   inconsistency that must be resolved.

   Did the user make a mistake; or is the offset intentional?

   One approach to solving this problem would be to raise an error,
   but this means that the user then needs to calculate the
   appropriate local offset and append that to a UTC time to satisfy
   the function. This is impractical because the offset can already
   be calculated by this library. The user should only need to
   provide a time without an offset!

   To resolve this inconsistency, the solution I chose was to scrub
   the offset. In the case where an offset is provided, the time is
   just converted to the UTC equivalent (without an offset). The
   resulting time is used as the local reference time.

   For example, if the time `08:00 +2` is passed to this function,
   the local time is assumed to be `06:00`.