When using --pinentry-mode=loopback for a keytocard action we're getting an odd error: "gpg: KEYTOCARD failed: Invalid time"
We're experiencing this on both MacOS and Ubuntu (5 different users so far).
I hit this myself using gpg (GnuPG) 2.4.5
It seems something "recent" (past 1~2yrs) as the script we've been using to setup our YubiKey has been untouched and working fine for ~2yrs, but in the past year more people starting hitting this issue.
I've been digging through gpg commits, but struggling to understand the code at times, I can't pinpoint anything that could be the cause...
it works fine without --pinentry-mode=loopback (but then we need to manually enter the pin a bunch of times)
There's more people hitting this (see external link to a reddit post)