docs: private void apply_offset(int offset)
      {
          if (offset == 0) return;
          if (offset < -24*60 || offset > 24*60) {
              throw new IllegalArgumentException("bad offset " + offset);
          }
          // To convert _to_ UTC you must SUBTRACT the local offset
          offset = -offset;
          int hour_offset = offset / 60;
          int min_offset = offset - (hour_offset * 60);
  
          if (offset < 0) {
              _minute += min_offset;  // lower the minute value by adding a negative offset
              _hour += hour_offset;
              if (_minute < 0) {
                  _minute += 60;
                  _hour -= 1;
              }
              if (_hour >= 0) return;  // hour is 0-23
              _hour += 24;
              _day -= 1;
              if (_day >= 1) return;  // day is 1-31
              // we can't do this until we've figured out the month and year: _day += last_day_in_month(_year, _month);
              _month -= 1;
              if (_month >= 1) {
                  _day += last_day_in_month(_year, _month);  // now we know (when the year doesn't change
                  assert(_day == last_day_in_month(_year, _month));
                  return;  // 1-12
              }
              _month += 12;
              _year -= 1;
              if (_year < 1) throw new IllegalArgumentException("year is less than 1");
              _day += last_day_in_month(_year, _month);  // and now we know, even if the year did change
              assert(_day == last_day_in_month(_year, _month));
          }
          else {
              _minute += min_offset;  // lower the minute value by adding a negative offset
              _hour += hour_offset;
              if (_minute > 59) {
                  _minute -= 60;
                  _hour += 1;
              }
              if (_hour < 24) return;  // hour is 0-23
              _hour -= 24;
              _day += 1;
              if (_day <= last_day_in_month(_year, _month)) return;  // day is 1-31
              // we can't do this until we figure out the final month and year: _day -= last_day_in_month(_year, _month);
              _day = 1; // this is always the case
              _month += 1;
              if (_month <= 12) {
                  return;  // 1-12
              }
              _month -= 12;
              _year += 1;
              if (_year > 9999) throw new IllegalArgumentException("year exceeds 9999");
          }
      }