I want to get all of today's event instances. For that, I'm using the following code:
Uri.Builder eventsUriBuilder = CalendarContract.Instances.CONTENT_URI.buildUpon();
ContentUris.appendId(eventsUriBuilder, start);
ContentUris.appendId(eventsUriBuilder, end);
final Cursor cursorInstances = contentResolver.query(eventsUri, null, null, null, sortOrder);
It's fine except for all day event instances, it returns for both today and tomorrow!
Update I know why is that because time zone of event instances with all day flag is Utc but I'm getting the event in local time so that's why but I still don't know how can I handle that.
Can someone help me out?