I am running the following code to view a specific event that I select out of a ListActivity:
Uri viewUri = Uri.parse("content://com.android.calendar/events/"+events.get(position).id);
Intent l_intent = new Intent(Intent.ACTION_VIEW);
l_intent.setData(viewUri);
startIntent(l_intent);
I am aware that the above code is not directly supported by Android - I am running this on Android 2.2. However, no matter what event I click on, the date/time is shown as December 31, 1969 at 7:00 p.m. When I look at my actual calendar, the event is in its rightful place. Also, if I run the following line:
System.out.println("start time is"+getDateTimeStr(events.get(position).startTime));
(where getDateTimeStr formats the string), I get the correct date/time back.
Does anyone know what could be causing this?