Elvis: Tack Rainer: Danke Maybe the format function uses the system locale instead of default QLocale, that would explain it.
-Even From: Interest [mailto:interest-bounces+even.kristoffersen=honeywell....@qt-project.org] On Behalf Of Rainer Wiesenfarth Sent: 14. juli 2016 15:12 To: interestqt-project.org <interest@qt-project.org> Subject: Re: [Interest] [QML] Qt.formatDateTime() and AM/PM 2016-07-14 14:31 GMT+02:00 Elvis Stansvik <elvst...@gmail.com<mailto:elvst...@gmail.com>>: estan@newton:~$ cat test.qml import QtQuick 2.0 Item { Component.onCompleted: console.info<http://console.info>(Qt.formatDateTime(new Date(), "hh:mm:ss AP")); } estan@newton:~$ I am able to reproduce the problem with 5.6.0 on Windows, using your snippet: D:\Develop\tests>qmlscene test.qml qml: Do 03:04:31 No am/pm is added, but hour is 0-12. But... ... this is with "Region and Language" set to German. If I set it to English, the output is as expected: D:\Develop\tests>qmlscene test.qml qml: Thu 03:05:37 PM So the problem seems to be the missing translation for "PM" and "AM", but this may be related to Windows rather than Qt. -- Software Engineer | Trimble Imaging Division Rotebühlstraße 81 | 70178 Stuttgart | Germany Office +49 711 22881 0 | Fax +49 711 22881 11 http://www.trimble.com/imaging/ | http://www.inpho.de/ Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim Eingetragen beim Amtsgericht Darmstadt unter HRB 83893, Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest