When one is using localtime_r as a threadsafe alternative, it's generally better to use the result written to the threadsafe struct instead of the result returned, as the result returned is the start of the unix epoch on some systems.