From 25f6509fe6d2e3adea4cb2ead7265e3a2d1536b7 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 10 Feb 2007 07:06:22 +0000 Subject: [PATCH] =?utf8?q?Bug=20369912:=20Buglists=20exported=20as=20iCale?= =?utf8?q?ndar=20have=20wrong=20timestamps=20-=20Patch=20by=20Fr=C3=83?= =?utf8?q?=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20r=3Dmyk?= =?utf8?q?=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- buglist.cgi | 4 ++-- template/en/default/list/list.ics.tmpl | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/buglist.cgi b/buglist.cgi index 7181c21993..122a917de2 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -1018,13 +1018,13 @@ while (my @row = $buglist_sth->fetchrow_array()) { # Put in the change date as a time, so that the template date plugin # can format the date in any way needed by the template. ICS and Atom # have specific, and different, date and time formatting. - $bug->{'changedtime'} = str2time($bug->{'changeddate'}); + $bug->{'changedtime'} = str2time($bug->{'changeddate'}, Bugzilla->params->{'timezone'}); $bug->{'changeddate'} = DiffDate($bug->{'changeddate'}); } if ($bug->{'opendate'}) { # Put in the open date as a time for the template date plugin. - $bug->{'opentime'} = str2time($bug->{'opendate'}); + $bug->{'opentime'} = str2time($bug->{'opendate'}, Bugzilla->params->{'timezone'}); $bug->{'opendate'} = DiffDate($bug->{'opendate'}); } diff --git a/template/en/default/list/list.ics.tmpl b/template/en/default/list/list.ics.tmpl index f857d30b60..814a397aae 100644 --- a/template/en/default/list/list.ics.tmpl +++ b/template/en/default/list/list.ics.tmpl @@ -18,7 +18,7 @@ # # Contributor(s): William Jon McCann #%] -[% PROCESS global/variables.none.tmpl %][% USE date %] +[% PROCESS global/variables.none.tmpl %] BEGIN:VCALENDAR CALSCALE:GREGORIAN [%+ PROCESS ics_prodid +%] @@ -32,7 +32,7 @@ BEGIN:VTODO [%+ PROCESS ics_status bug_status = bug.bug_status +%] [%+ PROCESS ics_dtstamp +%] [% IF bug.changeddate %] -[%+ date.format(bug.changedtime,"%Y%m%dT%H%M%SZ") FILTER ics('LAST-MODIFIED') +%] +[%+ time2str("%Y%m%dT%H%M%SZ", bug.changedtime, "UTC") FILTER ics('LAST-MODIFIED') +%] [% END %] [% IF bug.percentage_complete %] [%+ bug.percentage_complete FILTER format('%d') FILTER ics('PERCENT-COMPLETE') +%] @@ -66,11 +66,11 @@ END:VCALENDAR [% END %] [% BLOCK ics_dtstart %] - [% date.format(bug.opentime,"%Y%m%dT%H%M%SZ") FILTER ics('DTSTART') %] + [% time2str("%Y%m%dT%H%M%SZ", bug.opentime, "UTC") FILTER ics('DTSTART') %] [% END %] [% BLOCK ics_dtstamp %] - [% date.format(date.now,"%Y%m%dT%H%M%SZ") FILTER ics('DTSTAMP') %] + [% time2str("%Y%m%dT%H%M%SZ", currenttime, "UTC") FILTER ics('DTSTAMP') %] [% END %] [% BLOCK ics_status %] -- 2.47.2