Hello,

Im trying to parse a date from our backend using the
qx.util.format.DateFormat parse method.

My problem lies with interpreting locale, namely it doesn't work.
I've been working to figure it out thinking i did something wrong. But
since its written that it works just like the Java counterpart i fired up
a simple java app and it worked perfectly.


//Qooxdoo short

var exampleDate = "2010-04-12 09:25:18+0900";
var date = new qx.util.format.DateFormat("yyyy-MM-dd
hh:mm:ssZ",qx.locale.Manager.getInstance().getLocale());

console.log(exampleDate);
console.log(date.parse(exampleDate));

//Qooxdoo result
2010-04-12 09:25:18+0900                    //orginal string with date
Mon Apr 12 2010 09:25:18 GMT+0200 (CET) {}  //parsed date


//Java short

String testDate = "2010-04-12 09:25:18+0900";
java.text.SimpleDateFormat date = new
java.text.SimpleDateFormat("yyyy-MM-dd hh:mm:ssZ");

System.out.println(testDate);
System.out.println(date.parse(testDate));

//Java result
2010-04-12 09:25:18+0900                    //orginal string with date
Mon Apr 12 02:25:18 CEST 2010               //parsed date


Regards,

Piotr









------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to