For linux, there is faketime, which will set a specific date and time for all child processes. This enables you to test software you don't even compile for time-based problems, e.g. logic around Feb 29th or daylight saving time.
[0]: https://blog.davidv.dev/posts/cursing-a-process-vdso-for-tim...