On Mac, change date -R to date +"%a, %d %b %Y %H:%M:%S %Z" and base64 -w 0 to base64 -b 0
date -R
date +"%a, %d %b %Y %H:%M:%S %Z"
base64 -w 0
base64 -b 0
On Mac, change
date -R
todate +"%a, %d %b %Y %H:%M:%S %Z"
andbase64 -w 0
tobase64 -b 0