I posted a suggestion for mbedtls, but I am thinking the best solution might be to provide a PSA API for time. Not all systems will provide a time system that is suitable for use in cryptographic purposes (certificate expiration, etc...).
See: Mbed-TLS/TF-PSA-Crypto#362
The time epoch and width of time_t are unspecified by the C standard, so it cannot be guaranteed that time(), localtime() etc... will work for these purposes.