-rw-r--r-- | microkde/kdecore/klocale.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index d7e384c..7f31ab1 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp @@ -541,51 +541,51 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con // Qt treats a year in the range 0-100 as 1900-1999. // It is nicer for the user if we treat 0-68 as 2000-2068 if (year < 69) year += 2000; else if (c == 'y') year += 1900; break; } } //kdDebug(173) << "KLocale::readDate day=" << day << " month=" << month << " year=" << year << endl; if ( year != -1 && month != -1 && day != -1 ) { if (ok) *ok = true; return QDate(year, month, day); } error: if (ok) *ok = false; return QDate(); // invalid date } QTime KLocale::readTime(const QString &intstr, bool *ok) const { QTime _time; - _time = readTime(intstr, true, ok); + _time = readTime(intstr, false, ok); if (_time.isValid()) return _time; - return readTime(intstr, false, ok); + return readTime(intstr, true, ok); } QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const { QString str = intstr.simplifyWhiteSpace().lower(); QString Format = timeFormat().simplifyWhiteSpace(); if (!seconds) Format.replace(QRegExp(QString::fromLatin1(".%S")), QString::null); int hour = -1, minute = -1, second = seconds ? -1 : 0; // don't require seconds bool g_12h = false; bool pm = false; uint strpos = 0; uint Formatpos = 0; while (Format.length() > Formatpos || str.length() > strpos) { if ( !(Format.length() > Formatpos && str.length() > strpos) ) goto error; QChar c = Format.at(Formatpos++); if (c != '%') { |