def to_datetime
      if_timezone_offset(super) do |o,dt|
        offset = dt.offset
        result = DateTimeWithOffset.jd(dt.jd + dt.day_fraction - offset)
        result = result.new_offset(offset) unless offset == 0
        result.set_timezone_offset(o)
      end
    end
def to_datetime
      if_timezone_offset(super) do |o,dt|
        offset = dt.offset
        result = DateTimeWithOffset.jd(dt.jd + dt.day_fraction - offset)
        result = result.new_offset(offset) unless offset == 0
        result.set_timezone_offset(o)
      end
    end
An overridden version of `Time#to_datetime` that, if there is an
 associated {TimezoneOffset}, returns a {DateTimeWithOffset} with that
 offset.

 @return [DateTime] if there is an associated {TimezoneOffset}, a
   {DateTimeWithOffset} representation of this {TimeWithOffset}, otherwise
   a `Time` representation.