pivot-table: Use ctime_r() instead of ctime(), for thread safety.