Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#6028 closed defect (fixed)

Milestone with date 09/30/07 leads to iCalender export with 09/29/07

Reported by: J.Kraaijeveld@… Owned by: Christian Boos
Priority: normal Milestone: 0.11
Component: roadmap Version: devel
Severity: minor Keywords: roadmap icalender
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When I set the date of a milestone to 09/30/07 it gets exported to and iCalender file as 09/29/07

Attachments (1)

render_ics_in_req_tz-r6011.diff (2.9 KB ) - added by Christian Boos 17 years ago.
use trac.datefmt utilities when producing the iCal rendering of the roadmap

Download all attachments as: .zip

Change History (7)

comment:1 by Christian Boos, 17 years ago

Owner: changed from Christopher Lenz to Christian Boos
Severity: normalminor
Status: newassigned

I think I see the problem:

  1. User A sets a milestone due time to X, a datetime with A's tzinfo
  2. The milestone is saved and the X is converted to an amount of milliseconds since epoch (trac.util.datefmt.to_timestamp). This is a "neutral" date representation, the original timezone information is lost.
  3. User B loads a milestone, the due date is converted to a datetime with the utc tzinfo
  4. When rendering the milestone due time, we use milestone.due.timetuple() which is the date in UTC time, where we should take user B's timezone into consideration.

So we should either shift the timezone (due.astimezone(tzinfo)) or rather use our datefmt utilities which can take care of this.

comment:3 by Christian Boos, 17 years ago

(post-poning… still a few issues with the patch)

by Christian Boos, 17 years ago

use trac.datefmt utilities when producing the iCal rendering of the roadmap

comment:4 by Christian Boos, 17 years ago

Keywords: review added

Ok, patch updated. The DTSTAMP is UTC and the DTSTART is produced using the user's timezone.

comment:5 by J.Kraaijeveld@…, 17 years ago

The patch solves the bug I reported.

comment:6 by Christian Boos, 17 years ago

Keywords: review removed
Resolution: fixed
Status: assignedclosed

Thanks for the feedback. Patch committed in r6012.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.