diff --git a/src/corelib/tools/qlocale_mac.mm b/src/corelib/tools/qlocale_mac.mm index 80b37bec1f..c5519bfabf 100644 --- a/src/corelib/tools/qlocale_mac.mm +++ b/src/corelib/tools/qlocale_mac.mm @@ -123,8 +123,7 @@ static QString macDayName(int day, bool short_format) static QString macDateToString(const QDate &date, bool short_format) { - const QTimeZone tz = QTimeZone::fromCFTimeZone(QCFType(CFTimeZoneCopyDefault())); - QCFType myDate = QDateTime(date, QTime(), tz).toCFDate(); + QCFType myDate = QDateTime(date, QTime()).toCFDate(); QCFType mylocale = CFLocaleCopyCurrent(); CFDateFormatterStyle style = short_format ? kCFDateFormatterShortStyle : kCFDateFormatterLongStyle; QCFType myFormatter @@ -136,8 +135,7 @@ static QString macDateToString(const QDate &date, bool short_format) static QString macTimeToString(const QTime &time, bool short_format) { - const QTimeZone tz = QTimeZone::fromCFTimeZone(QCFType(CFTimeZoneCopyDefault())); - QCFType myDate = QDateTime(QDate::currentDate(), time, tz).toCFDate(); + QCFType myDate = QDateTime(QDate::currentDate(), time).toCFDate(); QCFType mylocale = CFLocaleCopyCurrent(); CFDateFormatterStyle style = short_format ? kCFDateFormatterShortStyle : kCFDateFormatterLongStyle; QCFType myFormatter = CFDateFormatterCreate(kCFAllocatorDefault,