RV3028 RTC with PICO, set time to local time?

It looks like a library bug. rtc.set_time constrains the year to the range [00-99], but then calls the corresponding RV3028 driver routine, which treats it as a 16-bit unsigned int and subtracts 2000 from it.

When you take all that into account, the results you got are actually inevitable:

00 (rtc) → -2000 (RV3028) → 0xf830 (16-bit uint) → 72 (BCD) → 48 (decimal)

21 (rtc) → -1979 (RV3028) → 0xf845 (16-bit uint) → 105 (BCD) → 69 (decimal)

2021 (rtc) → 21 (RV3028) → 0x0015 (16-bit uint) → 33 (BCD) → 21 (decimal)

Methinks rtc.set_time should actually take the full year instead of artificially constraining the input value.