I think one of my cronjobs failed when it ran at 00:00:00 2018-01-01. How can I debug that? Changing the system clock is clearly the wrong way to go, since it would disrupt the whole system and also depend on timing in order to reproduce the error...
Log entry and exit from shell script, so that you can ascertain that the script was started. (You might establish that it was started late in the minute 00:00:59 and effectively ran twice for 00:01:00 ?)
If your script gets the time to influence flow, then instead of getting the actual time, re-write it so that it takes the time (or date) as a parameter. This way you can test your script at various simulated times by passing them as a parameter.