diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 280d516452..801876629c 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -253,7 +253,7 @@ static QString toOffsetString(Qt::DateFormat format, int offset) return result.arg(offset >= 0 ? QLatin1Char('+') : QLatin1Char('-')) .arg(qAbs(offset) / SECS_PER_HOUR, 2, 10, QLatin1Char('0')) - .arg((offset / 60) % 60, 2, 10, QLatin1Char('0')); + .arg((qAbs(offset) / 60) % 60, 2, 10, QLatin1Char('0')); } // Parse offset in [+-]HH[:]MM format