WRITING
After a Power Loss, Where Does a Device Get Its First Trusted Time?
The first connection a device makes after a power loss can fail because its clock is wrong. That is the connection I want to see in a release test.
Imagine a field device with no working backup clock, no reliable timestamp on disk, and no Network Time Security (NTS) state it can reuse. The network is up, and the device can reach its time server. TLS fails because the device’s clock is years behind and puts the server certificate before its validity period.
NTS uses TLS to authenticate the server and establish keys. The device then uses those keys to authenticate its NTP time exchanges. Certificate validity is checked in the first stage, when the device may still have the wrong time. A bench test that starts with a correctly set clock can miss this dependency altogether. RFC 8915 §8.5

Start with the evidence the device actually has
At a design review, I would ask what survives a power loss. A working battery-backed clock may keep time close enough for certificate validation from the first connection. That assumption depends on the hardware and on how long the product expects to stay without power.
A timestamp saved after a trusted synchronization can provide a lower bound if the device can rely on the record. It can help rule out a certificate that expired before that recorded time. The record alone cannot tell the device what time it is now. RFC 8915 §8.5
Without either source, I would ask how the device is expected to get through its first connection. If it requires an operator to set an approximate time, that belongs in the recovery procedure and the acceptance test. If the product temporarily relaxes certificate date checks, the design needs to specify which connection can use that exception, how the server’s identity and chain of trust are still verified, and when date checks take effect again.
Chrony 4.8 treats relaxing those checks as a last resort. Its default keeps them enabled, and its startup exception is limited by the number of clock updates. I would record when the exception ends and measure the clock’s error against the product requirement. chrony 4.8 configuration reference
Three proposed release acceptance tests
These are test designs for the hypothetical device. Before testing, agree on the maximum clock error, the deadlines measured from power-on or service restoration, and the features that should remain available while time is unreliable. Use a monotonic timer or an external observer for elapsed time. The device’s wall clock can move during the test.
A. Cold-boot a device with the wrong time
Setup and procedure. Power-cycle the target hardware with the firmware and configuration intended for release. Verify that the initial clock is earlier than the test certificate’s validity window, with no usable backup clock, saved trusted timestamp, or reusable NTS state. Keep the designated time service reachable and let the supported startup procedure run.
Pass criteria. The trace identifies the initial time source or startup step, a fresh NTS key establishment, and an authenticated time sample from the intended source that the device actually uses. An independent reference shows the clock reaches the required accuracy within the allowed time. Features that require trusted time remain gated until the specified conditions are met, then complete a representative operation.
B. Take the time service away and bring it back
Setup and procedure. Repeat the cold boot twice. In the first run, make the key establishment service unavailable. In the second, allow key establishment and withhold NTP replies from the start. Confirm that the first run never establishes keys during the outage and that the second establishes keys without acquiring a usable time sample. During each outage, try a feature that should remain available, such as local diagnostics, and one that requires trusted time. Then restore the affected service and record how the device retries.
Pass criteria. The features promised during an outage remain usable. The device keeps time-dependent features on hold and uses only approved time sources. Check the device trace for automatic fallback from NTS to unprotected NTP, even if the same server still answers plain NTP requests. Any such fallback fails this test. RFC 8915 §8.7 Measured from service restoration, it reaches the required accuracy within the recovery window and completes a previously unavailable operation, such as opening a new connection to its management service. The trace shows the device used an authenticated time sample. A product that promises unattended recovery must complete this sequence without operator intervention after service is restored.
C. Verify that expired certificates are rejected after startup
Setup and procedure. Check that the device clock meets the accuracy requirement against an independent reference. If the device has a startup exception, wait for it to end in the same boot and keep the time client running throughout both trials. Use the same controlled NTS endpoint and two certificates. Keep the server identity, trust chain, and other validation conditions equivalent. Present an in-date certificate in one trial and an expired certificate in the other. Have that same time client initiate a fresh NTS key establishment with a full TLS handshake in each trial, and verify that neither trial uses TLS session resumption.
Pass criteria. The client accepts the in-date certificate and establishes NTS keys. It rejects the expired certificate and records expiration as the reason. Record the device time for both handshakes and, for a chrony startup exception, evidence that the configured clock-update count was reached. A device with existing NTS keys can continue to exchange time messages without performing this certificate check again, which is why the test has to exercise a fresh handshake. RFC 5280 §6.1.3 · RFC 8915 §8.5 · chronyc authentication status
What can we promise the customer?
I would ask firmware engineering to own the evidence for boot, time acquisition, and feature availability. The time service team would provide the test endpoint, controlled outages, and certificate fixtures. The release owner would use the results to decide which hardware revisions, builds, and deployment configurations are ready to ship.
That decision matters when two revisions have different clocks or different ways to recover. If one needs a technician after an extended power loss, the release decision should account for that visit, who can make it, and how long the customer may be waiting.
At sign-off, I would ask what a customer can do as soon as the power comes back, what has to wait for trusted time, and how long that took in tests on the build we intend to ship.
Related reading: The Credential Was Rotated. Can the Certificate Still Renew?