fix to time conversion