core: utils/tmrec - use safer localtime_r() instead of localtime()