Last active
August 29, 2015 14:02
-
-
Save ShinJJang/d93b26fe4f277c261b86 to your computer and use it in GitHub Desktop.
Android bug report : CalendarContract Instance query result in today include all day event in yesterday.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
device : Nexus 5 4.4.3 | |
I want events in one day. So I use CalendarContract Instance query with start to end time in today. Problem is yesterday all day event in result. | |
Uri.Builder builder = CalendarContract.Instances.CONTENT_URI.buildUpon(); | |
ContentUris.appendId(builder, Today start time) | |
ContentUris.appendId(builder, Today end time) | |
time log here. | |
Today start time : 06-13 01:51:31.628 D/TAG2 START﹕ Fri Jun 13 00:00:00 GMT+09:00 2014 | |
Today end time : 06-13 01:51:31.628 D/TAG2 START﹕ Sat Jun 14 00:00:00 GMT+09:00 2014 | |
But in result, all day event's start time log is | |
06-13 01:37:23.108 D/TAG2 START﹕ Thu Jun 12 09:00:00 GMT+09:00 2014 | |
06-13 01:37:23.108 D/TAG2 END﹕ Fri Jun 13 09:00:00 GMT+09:00 2014 | |
This event is all day event in yesterday! | |
I think this is probably CalendarContract Instance bug. I explain some guess. | |
1. CalendarContract Instance may be not support all day event. But it's bug. | |
2. CalendarContract Instance query need some thing timezone default. I guess all day event do not have time. So CalendarContract query method set time just created in default time(GMT+00:00). But I am in GMT+09:00. So all day event time is 9 to next day 9. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment