Closed
Bug 299327
Opened 20 years ago
Closed 19 years ago
Events created after 17:00 appear in the next day
Categories
(Calendar :: Lightning Only, defect, P1)
Calendar
Lightning Only
Tracking
(Not tracked)
RESOLVED
FIXED
Lightning 0.1
People
(Reporter: pavlov, Assigned: dmosedale)
References
()
Details
Attachments
(1 file, 2 obsolete files)
|
6.53 KB,
patch
|
dmosedale
:
first-review+
|
Details | Diff | Splinter Review |
In the week view, if I create an event between 17:00-23:59, it shows up at that time +1 day. Some date is in UTC I suspect...
| Reporter | ||
Updated•20 years ago
|
Severity: normal → major
Priority: -- → P1
Target Milestone: --- → Lightning 0.8
| Assignee | ||
Comment 1•19 years ago
|
||
*** Bug 304890 has been marked as a duplicate of this bug. ***
| Assignee | ||
Updated•19 years ago
|
Assignee: vladimir → dmose
| Assignee | ||
Comment 2•19 years ago
|
||
It seems that icaltime_compare_date_only() has the following implementation quirk: the "date only" comparison happens in UTC: so even though the two times may be on the same day in PST, they may fall on different sides of the UTC dateline once they've been normalized so that they can be compared. It seems to me that the API may be broken here: it's not obvious to me how the function can possibly do the right thing in all cases unless it's given a third parameter: the timezone to do the comparison in. Thoughts?
Status: NEW → ASSIGNED
| Assignee | ||
Comment 3•19 years ago
|
||
At the calIDateTime level, I'm inclined to make the compare() function asymmetric by adding the following semantic: for date-only comparisons, the compare is done in the timezone of the object that compare() is being called on. This could be implemented in one of several ways: * add a third arg to icaltime_compare_date_only * add a icaltime_compare_date_only_in_timezone to libical * leave libical alone, and do a bunch of normalization/workaround math with the dates before calling icaltime_compare_date_only The first solution seems to me to be the most correct.
| Assignee | ||
Comment 4•19 years ago
|
||
This is just a hack to make it possible to use lightning as dogfood until I get the real fix done. I'm going to send mail to the libical mailing list proposing an API change there. This patch also contains a minor code cleanup.
Attachment #193292 -
Flags: first-review?(vladimir)
Comment 5•19 years ago
|
||
Comment on attachment 193292 [details] [diff] [review] workaround for multiday-view, p1 r=shaver
Attachment #193292 -
Flags: first-review?(vladimir) → first-review+
| Assignee | ||
Comment 6•19 years ago
|
||
Attachment #193770 -
Flags: first-review?(vladimir)
| Assignee | ||
Updated•19 years ago
|
Attachment #193292 -
Attachment is obsolete: true
Comment 7•19 years ago
|
||
Comment on attachment 193770 [details] [diff] [review] the real fix >+ * An invalid or nonexistant timezone was encountered. "nonexistent" >+ if (mIsDate || otherIsDate) { >+ icaltimezone *tz; >+ nsresult rv = GetIcalTZ(mTimezone, &tz); >+ if (NS_FAILED(rv)) >+ return calIErrors::INVALID_TIMEZONE; >+ >+ *aResult = icaltime_compare_date_only(a, b, tz); >+ } >+ else { > *aResult = icaltime_compare(a, b); >+ } Our braces like to cuddle with elses: } else { (Too much time in mailnews for you!) I like it -- can you send it upstream too? (The libical parts.) r=shaver with nits fixed.
Attachment #193770 -
Flags: first-review?(vladimir) → first-review+
| Assignee | ||
Comment 8•19 years ago
|
||
Nits fixed; carrying forward r=shaver.
Attachment #193770 -
Attachment is obsolete: true
Attachment #193835 -
Flags: first-review+
| Assignee | ||
Comment 9•19 years ago
|
||
Checked in; mail sent to the libical list to see if they want this. Gonna leave this open until the upstream bits get resolved.
Comment 10•19 years ago
|
||
If you don't mind, can you file a new bug with just the libical stuff for upstream merge? We don't have this (awful) problem any more, and it's not well-summarized to describe the outstanding merge work. *smooch*
| Assignee | ||
Comment 11•19 years ago
|
||
Done. Bug 306112 has been filed to track the upstream propagation.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
QA Contact: shaver → lightning
You need to log in
before you can comment on or make changes to this bug.
Description
•