I have an update on this issue. It looks like some kind of clock issue which resolves itself if I do a sudo reboot of the Raspberry Pi. I noticed that with the following test code, it was injecting every hour at exactly 32 minutes past the hour (e.g. 1:32pm, 2:32pm my time) and then simpletime reported the time being 32 minutes past the hour which followed the flow into Time Sync Error.
(In those tests that were 32 minutes out, the injected timestamp of the message also reflected an epoch time 32 minutes past the hour). The time was 1:32 etc. in my local time.
So this rules out some kind of randomly long-running node or flow. Because the problem triggered every hour with exactly 32 minutes out. It also couldn't be a daylight savings error either because that would be exactly 30 or 60 minutes.
Here is the example code.
[{"id":"d3d44654.2e41c8","type":"inject","z":"f72ea602.fbc808","name":"@8am every day","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 08 * * *","once":false,"onceDelay":0.1,"x":150,"y":3540,"wires":[["c90b11be.a78da"]]},{"id":"9822f822.511558","type":"comment","z":"f72ea602.fbc808","name":"Detection of the problem where triggers start late.","info":"","x":220,"y":3460,"wires":[]},{"id":"d9b4caa.f1b4338","type":"change","z":"f72ea602.fbc808","name":"\"On-the-hour Time Sync error\"","rules":[{"t":"set","p":"payload","pt":"msg","to":"'On-the-hour Time Sync error. now:' & myrawdate & ', epoch: ' & payload","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":3520,"wires":[["3471e8bf.728518","a1e84ac.13cb2b8"]]},{"id":"549d4b73.609684","type":"inject","z":"f72ea602.fbc808","name":"Test it","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":3500,"wires":[["c90b11be.a78da"]]},{"id":"a1e84ac.13cb2b8","type":"debug","z":"f72ea602.fbc808","name":"TIME SYNC ERROR","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","x":1270,"y":3520,"wires":[]},{"id":"c90b11be.a78da","type":"simpletime","z":"f72ea602.fbc808","name":"","x":390,"y":3500,"wires":[["5ea8459d.4d869c"]]},{"id":"5ea8459d.4d869c","type":"switch","z":"f72ea602.fbc808","name":"Within 5 minutes of the hour?","property":"myminute","propertyType":"msg","rules":[{"t":"lte","v":"5","vt":"num"},{"t":"gte","v":"55","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":640,"y":3500,"wires":[["e722190d.3d4988"],["e722190d.3d4988"],["d9b4caa.f1b4338"]]},{"id":"d3c8425a.61cd3","type":"inject","z":"f72ea602.fbc808","name":"@9am every day","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 09 * * *","once":false,"onceDelay":0.1,"x":150,"y":3580,"wires":[["c90b11be.a78da"]]},{"id":"3fafa0a2.5d626","type":"inject","z":"f72ea602.fbc808","name":"@10am every day","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 10 * * *","once":false,"onceDelay":0.1,"x":150,"y":3620,"wires":[["c90b11be.a78da"]]},{"id":"a2621243.26fc","type":"inject","z":"f72ea602.fbc808","name":"@11am every day","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 11 * * *","once":false,"onceDelay":0.1,"x":150,"y":3660,"wires":[["c90b11be.a78da"]]},{"id":"cd85323.1e85bd","type":"inject","z":"f72ea602.fbc808","name":"@noon every day","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 12 * * *","once":false,"onceDelay":0.1,"x":150,"y":3700,"wires":[["c90b11be.a78da"]]},{"id":"5afa93e9.26110c","type":"inject","z":"f72ea602.fbc808","name":"@1pm every day","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 13 * * *","once":false,"onceDelay":0.1,"x":150,"y":3740,"wires":[["c90b11be.a78da"]]},{"id":"4e9b6032.247c9","type":"inject","z":"f72ea602.fbc808","name":"@2pm every day","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 14 * * *","once":false,"onceDelay":0.1,"x":150,"y":3780,"wires":[["c90b11be.a78da"]]},{"id":"aa03e57d.1a3518","type":"inject","z":"f72ea602.fbc808","name":"@3pm every day","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 15 * * *","once":false,"onceDelay":0.1,"x":150,"y":3820,"wires":[["c90b11be.a78da"]]},{"id":"f245d62d.c7fc28","type":"inject","z":"f72ea602.fbc808","name":"@4pm every day","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 16 * * *","once":false,"onceDelay":0.1,"x":150,"y":3860,"wires":[["c90b11be.a78da"]]},{"id":"81b5cbb4.65f428","type":"inject","z":"f72ea602.fbc808","name":"@5pm every day","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 17 * * *","once":false,"onceDelay":0.1,"x":150,"y":3900,"wires":[["c90b11be.a78da"]]},{"id":"dad6d00c.24d93","type":"inject","z":"f72ea602.fbc808","name":"@6pm every day","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 18 * * *","once":false,"onceDelay":0.1,"x":150,"y":3940,"wires":[["c90b11be.a78da"]]},{"id":"e722190d.3d4988","type":"debug","z":"f72ea602.fbc808","name":"TIME SYNC OK","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","x":1250,"y":3480,"wires":[]}]
I'd love to see if anyone can just leave it running and see if it triggers for them, and on which OS.
Next time it happens I will have a look at the system time on the Pi, but I am pretty confident it will be correct. After all, the simpletime node injects the correct real world time.