reduce the scope of the stringify_time function