Closed
Bug 369912
Opened 17 years ago
Closed 17 years ago
buglists exported as iCalendar have wrong timestamps
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: LpSolit, Assigned: LpSolit)
Details
Attachments
(1 file)
2.63 KB,
patch
|
myk
:
review+
|
Details | Diff | Splinter Review |
When exported in the iCalendar format, buglists must be exported using the GMT (aka Zulu) timezone, but Bugzilla exports them using the local timezone and appends "Z" (Zulu) without converting timestamps first. This makes applications such as Sunbird to collect wrong dates and times. I tested my patch on landfill/qa30 for both Atom feeds and iCalendar lists, and I found no regression. ;)
Attachment #254573 -
Flags: review?(myk)
Comment 1•17 years ago
|
||
Comment on attachment 254573 [details] [diff] [review] patch, v1 >Index: buglist.cgi >- $bug->{'changedtime'} = str2time($bug->{'changeddate'}); >+ $bug->{'changedtime'} = str2time($bug->{'changeddate'}, Bugzilla->params->{'timezone'}); ... >- $bug->{'opentime'} = str2time($bug->{'opendate'}); >+ $bug->{'opentime'} = str2time($bug->{'opendate'}, Bugzilla->params->{'timezone'}); What happens when the "timezone" parameter is empty or contains an invalid value? >Index: template/en/default/list/list.ics.tmpl Nit: use UTC instead of GMT (which is deprecated). Note that list.csv.tmpl and list.atom.tmpl are also using date.format and should also be switched over to time2str, although that can be done in a different bug. r=myk
Attachment #254573 -
Flags: review?(myk) → review+
Comment 2•17 years ago
|
||
One more note: Template.pm asks whether we should replace time2str with TT's Date plugin. We should remove that question and add a comment saying not to use the Date plugin because of this issue.
Assignee | ||
Comment 3•17 years ago
|
||
(In reply to comment #1) > What happens when the "timezone" parameter is empty or contains an invalid > value? It cannot be invalid. editparams.cgi validates the timezone. If it's empty, it will behave exactly the same way as now, i.e. will consider the local timezone.
Assignee | ||
Comment 4•17 years ago
|
||
Checking in buglist.cgi; /cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi new revision: 1.351; previous revision: 1.350 done Checking in template/en/default/list/list.ics.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/list/list.ics.tmpl,v <-- list.ics.tmpl new revision: 1.6; previous revision: 1.5 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: approval+
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•