Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.2.0
-
None
-
QtCreator 3.0.0, Qt 5.2.0, Windows Seven 64bits
Description
See the code below for the error.
I build a javascript Date with 3600000 milliseconds (http://www.w3schools.com/jsref/jsref_obj_date.asp)
Then I get the hour with formatTime. It returns 2h00 and not 1h00.
If I set the Date with 3600 milliseconds, formatTime returns 1h00 (I guess that there is a mistake between seconds and milliseconds in the format)
import QtQuick 2.0 Rectangle { width: 360 height: 360 function f() { var d = new Date(3600000); console.log(d.getTime()); return Qt.formatTime(d, "h'h'mm") // return 2h00 } Text { text : f() anchors.centerIn: parent } }