On 2024-08-23 13:43, Alejandro Colomar wrote:
strftime("%s") would be interesting, but it accepts a struct tm, not a time_t
That's not a problem, since mktime effectively returns a struct tm as well as a time_t.
You should not use strftime with %s, though, since that might not work on some platforms during fall-back periods. You can use strftime with "%Y-%m-%d %H:%M:%S %z".