We have been having unexplained failures with the codesign tool recently on macosx aarch64 and x64 hosts. Every once in a while when signing an app locally using the following command:
/usr/bin/codesign -s - -vvvv --force /home/me/FooBarCalculator.app
results in the following error:
/home/me/FooBarCalculator.app: timestamps differ by 185 seconds - check your system clock
The number of seconds reported in the error message keeps varying (but usually in that range). We have checked the system clock but there isn't anything wrong (from what we can see) with the host. In fact, we have been seeing this error on several hosts now, so it isn't specific to one host.
While looking into this issue, we even printed the details of an already signed binary using the following command:
codesign -dvvv HelloWorld.app
and that prints among other things, similar warning message:
...
Timestamp=12 May 2026 at 5:36:0 AM
HelloWorld.app: timestamp mismatch: internal time 12 May 2026 at 5:32:59 AM (184 seconds apart)
I'm looking for inputs on how we go about debugging this issue and where/how the codesign tool sources these timestamps from (any specific API?) and what value is it comparing against to notice a difference.
These affected hosts have different operating system versions some 15.x and some 26.x.
I've filed FB22826737 requesting an improvement to this message.
An update about this issue. Apple has addressed this in a Beta version of the upcoming macos 27 release. I was notified on the feedback assistance issue asking me to verify the fix. I verified it on a macos 27 Beta3 and it has indeed been addressed. Specifically, on a pre-existing signed binary which has a timestamp mismatch in the signature, when using "codesign" to replace the signature with an "adhoc" one, "codesign" no longer prints the timestamp mismatch warning and no longer exits with a non-zero exit code. The signature is successfully replaced on the binary.
Thank you for addressing this so quickly and also for being responsive on the feedback ticket.