Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1506] Ti.Calendar.Event.begin / end takes one day earlier than the given date on android

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2015-04-06T23:46:19.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules
LabelsTCSupportTriage, andorid, calendar, event
ReporterManojkumar Murugesan
AssigneeRadamantis Torres-Lechuga
Created2014-11-14T14:52:15.000+0000
Updated2016-03-08T07:37:57.000+0000

Description

var moment = require("alloy/moment");
var calendar = OS_IOS ? Ti.Calendar.defaultCalendar : Ti.Calendar.selectableCalendars[0];

var details = {
    title: "Event is recorded with wrong date",
    description: "one day earlier form given date",
    begin: moment.unix("1415976478").toDate(), //Fri, 14 Nov 2014
    end: moment.unix("1415976478").toDate(), //Fri, 14 Nov 2014
    allDay: true
};
var event = calendar.createEvent(details);
if(OS_IOS){
event.save(Ti.Calendar.SPAN_THISEVENT);
}
The above code creates a event on 14th Nov on iOS and 13th Nov on Android. Seems a bug with android calendar module.

Comments

No comments

JSON Source