[mythtv-users] QDateTime::fromString: Parameter out of range
Michael T. Dean
mtdean at thirdcontact.com
Mon May 12 17:11:19 UTC 2008
On 05/12/2008 12:35 PM, James Cummings wrote:
> I've been getting lots of errors in my logs recently which look like this:
> QDateTime::fromString: Parameter out of range
> Any suggestions as to what might be causing it? This is using
> mythtv in ubuntu hardy 0.21.0+fixes16838-0ubuntu3
It's a harmless call to QDateTime::fromString() where the value being
passed to it cannot be parsed to a valid QDateTime (i.e. this happens
when passing empty ("" or null) strings or a "zero" date (which could
come from MySQL) to fromString(). The invalid date/times occur when,
i.e. your grabber doesn't provide a value for some date-related field in
MythTV (i.e. the original_air_date). Because the dates are invalid in
the DB, the invalid QDate or QDateTime we get is appropriate.
It's probably not worth worrying about as a) it's harmless and b) the
QDate::fromString() and QDateTime::fromString() handling in Qt4 has been
much improved, so trunk will probably (eventually) be fixed more simply
than 0.21-fixes. However, we have unchecked arguments passed to the
fromString() functions throughout Myth, so a piecemeal approach to
"fixing" them is not appropriate.
See http://svn.mythtv.org/trac/ticket/3478 .
More information about the mythtv-users