Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2858] Android: Ti.UI.PICKER_TYPE_TIME not checking timezone

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:00:16.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M06
ComponentsAndroid
Labelsandroid, date, defect, enterprise, picker, release-1.5.2, release-1.6.0, reported-1.5.1, rplist
ReporterAlan Leard
AssigneeDon Thorp
Created2011-04-15T03:31:20.000+0000
Updated2011-04-17T02:00:16.000+0000

Description

Ticket Reference: http://developer.appcelerator.com/helpdesk/view/66871">http://developer.appcelerator.com/helpdesk/view/66871

Using the Picker widget with the useSpinner flag set to true, the system ignores the users timezone and displays GMT.

var d = new Date();
Ti.API.error("The date is: " + d);
 
//[ERROR] [942,1315] The date is: Mon Jan 17 2011 15:09:31 GMT-0800 (PST)
 
var timePicker = Ti.UI.createPicker({
    type: Ti.UI.PICKER_TYPE_TIME,
    useSpinner:true,
    value:d
});
win.add(timePicker);
win.open();

Comments

  1. Andreas sandberg 2011-04-15

    This bug affects all UI widgets that can receive their value property as a date object so at least four widgets are affected, can we bump up the priority to high? Also, I have submitted a pull request for the fix: https://github.com/appcelerator/titanium_mobile/pull/60">https://github.com/appcelerator/titanium_mobile/pull/60

  2. Bill Dawson 2011-04-15

    (from [20640931bf29aada4f66a0152c57ad102db12211]) [#2858 state:fixed-in-qa] adjust TiConvert.toJSONString so it properly puts the string representation of the date in UTC rather than local https://github.com/appcelerator/titanium_mobile/commit/20640931bf29aada4f66a0152c57ad102db12211"> https://github.com/appcelerator/titanium_mobile/commit/20640931bf29...

  3. Bill Dawson 2011-04-15

    (from [84c6ea58ceae9dc0f52d909548db7352ab8368f5]) [#2858 state:fixed-in-qa] adjust TiConvert.toJSONString so it properly puts the string representation of the date in UTC rather than local https://github.com/appcelerator/titanium_mobile/commit/84c6ea58ceae9dc0f52d909548db7352ab8368f5"> https://github.com/appcelerator/titanium_mobile/commit/84c6ea58ceae...

  4. Marshall Culpepper 2011-04-15

    verified on Nexus S / 2.3.2

JSON Source