convert time to string to prevent error