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.
we even printed the details of an already signed binary … and that prints [a] similar warning message
OK. Lemme explain how that message comes about, and I think you’ll be able to extrapolate from there.
The codesign tool calls SecCodeCopySigningInformation and looks at two properties: kSecCodeInfoTime and kSecCodeInfoTimestamp. If the values differ significantly (3 minutes IIRC) you get this message.
While these properties are covered reasonably well by the documentation, the best source of info about them is the doc comments in <Security/SecCode.h>. In summary:
kSecCodeInfoTimestampis secure, having been issued by Apple’s timestamp service. For more on that, see the Certificate expiration section of TN3161 Inside Code Signing: Certificates.kSecCodeInfoTimeis based on your Mac’s time setting.
So I suspect that the Mac doing the signing has a clock that’s way of sync with reality, so these two values end up significantly different, and thus this problem.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"