Hello,
this was reported Michael Below on the Debian BTS. It still applies to 2.4.7:
today I generated a new key (0xfaaad43b), and I set the expiration date to 24 months. I had expected this to be the same as two years, as it is defined in the calendar. In fact, it is ten days less.
It looks like gpg assumes that one month = 30 days, so a timespan of one month from today, according to gpg, ends not on March 24th, but on March 26th. This is obviously wrong.
GnuPG should use the measure month as defined in the calendar. Alternatively, it could define its own measure, but then it should be named differently.
testit@argenau:~$ date Sun Apr 27 13:26:44 CEST 2025 testit@argenau:~$ gpg --full-generate-key [...] Please specify how long the key should be valid. 0 = key does not expire <n> = key expires in n days <n>w = key expires in n weeks <n>m = key expires in n months <n>y = key expires in n years Key is valid for? (0) 24m Key expires at Sat Apr 17 13:22:04 2027 CEST