Skip to content

Commit

Permalink
Made extra DATE format independent of locale
Browse files Browse the repository at this point in the history
  • Loading branch information
andibacher committed May 3, 2016
1 parent 156173b commit 0e8c596
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/helpers/datetime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ QString DateTime::toString(const QString &rFormat) const
if (format == QLatin1String("ABSOLUTE"))
format = QLatin1String("HH:mm:ss.zzz");
if (format == QLatin1String("DATE"))
format = QLatin1String("dd MMM yyyy HH:mm:ss.zzzz");
format = QLatin1String("dd MM yyyy HH:mm:ss.zzzz");

return formatDateTime(format);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/log4qttest/log4qttest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void Log4QtTest::DateTime_alternativelyFormat_data()
QTest::newRow("RELATIVE") << QString("RELATIVE") << reference << QString::number(diffTime);
QTest::newRow("ISO8601") << QString("ISO8601") << reference << QString("2016-05-03 15:07:05.009");
QTest::newRow("ABSOLUTE") << QString("ABSOLUTE") << reference << QString("15:07:05.009");
QTest::newRow("DATE") << QString("DATE") << reference << QString("03 Mai 2016 15:07:05.0099");
QTest::newRow("DATE") << QString("DATE") << reference << QString("03 05 2016 15:07:05.0099");
QTest::newRow("CUSTOM1") << QString("yyyy-MM-dd hh:mm:ss.zzz") << reference << QString("2016-05-03 15:07:05.009");
}

Expand Down

0 comments on commit 0e8c596

Please sign in to comment.