The Problem
On Android, the JavaScript "Date" object's "toLocaleString" function doesn't respect the "Use 24-hour format" setting in the "Date & time settings".
Code Sample
For example, place the following in an app.js.
* It will create a new Date on October 1st, 2011 at 1pm.
* Go in to the device's Settings app, then Date & time settings, and check "Use 24-hour format".
* When you run the app, it will alert if the first 2 characters of theDate.toLocaleString() are 13, and thus if the 24-hour format is being used.
var time = new Date(2011, 10, 1, 13, 0, 0).toLocaleTimeString();
var is24HourTime = time.substring(0, 2) == '13';
alert(time + ': Is 24 Hour Time? ' + (is24HourTime ? 'Yes!' : 'No...'));
Associated Helpdesk Ticket
http://appc.me/c/WPP-21246-756
Run the attached manual test case to verify this fix works
https://github.com/appcelerator/titanium_mobile/pull/139 was merged. No 1.7.2 label is on this, so resolving.
Tested with 1.8.0.v20110819142548 iPhone 4.3.4 iPad2 4.3.2 Motorola Xoom 3.2 Nexus One 2.2.2