docs: private void set_fields_from_calendar(Calendar cal,
                                            Precision precision,
                                            boolean setLocalOffset)
      {
          _precision = precision;
          _offset = UNKNOWN_OFFSET;
          boolean dayPrecision = false;
          boolean calendarHasMilliseconds = cal.isSet(Calendar.MILLISECOND);
  
          switch (this._precision) {
              case FRACTION:
              case SECOND:
                  this._second = checkAndCastSecond(cal.get(Calendar.SECOND));
                  if (calendarHasMilliseconds) {
                      BigDecimal millis = BigDecimal.valueOf(cal.get(Calendar.MILLISECOND));
                      this._fraction = millis.movePointLeft(3); // convert to fraction
                      checkFraction(precision, this._fraction);
                  }
              case MINUTE:
              {
                  this._hour   = checkAndCastHour(cal.get(Calendar.HOUR_OF_DAY));
                  this._minute = checkAndCastMinute(cal.get(Calendar.MINUTE));
  
                  // If this test is made before calling get(), it will return
                  // false even when Calendar.setTimeZone() was called.
                  if (setLocalOffset && cal.isSet(Calendar.ZONE_OFFSET))
                  {
                      int offset = cal.get(Calendar.ZONE_OFFSET);
                      if (cal.isSet(Calendar.DST_OFFSET)) {
                          offset += cal.get(Calendar.DST_OFFSET);
                      }
  
                      // convert ms to minutes
                      _offset = offset / (1000*60);
                  }
              }
              case DAY:
                  dayPrecision = true;
              case MONTH:
                  // Calendar months are 0 based, Timestamp months are 1 based
                  this._month  = checkAndCastMonth((cal.get(Calendar.MONTH) + 1));
              case YEAR:
                  int year;
                  if(cal.get(Calendar.ERA) == GregorianCalendar.AD) {
                      year = cal.get(Calendar.YEAR);
                  }
                  else {
                      year = -cal.get(Calendar.YEAR);
                  }
  
                  this._year = checkAndCastYear(year);
          }
  
          if (dayPrecision)
          {
              this._day = checkAndCastDay(cal.get(Calendar.DAY_OF_MONTH), _year, _month);
          }
  
          if (_offset != UNKNOWN_OFFSET) {
              // Transform our members from local time to Zulu
              this.apply_offset(_offset);
          }
      }