Make the time conversion thread-safe