In Common/mkversion.sh, the call to date becomes, for example, date -u -d@1635638250. This only works on GNU date. For BSD date, I had to manually change it to call date -u -r1635638250 instead. See: https://github.com/Homebrew/homebrew-core/pull/89802
I will take care of this ASAP.
The fix for this has been committed to the 4.1 and master branches.