Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#9668 closed enhancement (fixed)

[PATCH] Add ics timezone

Reported by: Thijs Triemstra <lists@…> Owned by: Thijs Triemstra
Priority: low Milestone: 1.0
Component: general Version: 0.12-stable
Severity: minor Keywords: bitesized
Cc: Branch:
Release Notes:

Added X-WR-CALDESC and X-WR-TIMEZONE fields to the ICS export of the roadmap.

API Changes:
Internal Changes:

Description

Apple's iCal supports the X-WR-TIMEZONE extension that takes the form of:

X-WR-TIMEZONE:Europe/Amsterdam

Pygments could provide that information?

Attachments (1)

ics-timezone-desc.patch (1.2 KB ) - added by Thijs Triemstra <lists@…> 14 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 by Thijs Triemstra <lists@…>, 14 years ago

iCal also exports this additional VTIMEZONE data..

BEGIN:VTIMEZONE
TZID:Europe/Amsterdam
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
DTSTART:19810329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
TZNAME:CEST
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
DTSTART:19961027T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
TZNAME:CET
END:STANDARD
END:VTIMEZONE
BEGIN:VTIMEZONE
TZID:Europe/London
BEGIN:DAYLIGHT
TZOFFSETFROM:+0000
TZOFFSETTO:+0100
DTSTART:19810329T010000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
TZNAME:BST
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
DTSTART:19961027T020000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
TZNAME:GMT
END:STANDARD
END:VTIMEZONE

in reply to:  description ; comment:2 by Remy Blank, 14 years ago

Replying to Thijs Triemstra <lists@…>:

Pygments could provide that information?

Pygments? WrongTrac? :)

in reply to:  description comment:3 by Thijs Triemstra <lists@…>, 14 years ago

Replying to Thijs Triemstra <lists@…>:

Apple's iCal supports the X-WR-TIMEZONE extension

And MS Outlook.

comment:4 by Thijs Triemstra <lists@…>, 14 years ago

Here's a patch I'm not sure where to put atm that adds the X-WR-CALDESC project description to a calendar:

  • trac/ticket/roadmap.py

     
    434434        write_prop('METHOD', 'PUBLISH')
    435435        write_prop('X-WR-CALNAME',
    436436                   self.env.project_name + ' - ' + _('Roadmap'))
     437        write_prop('X-WR-CALDESC', self.env.project_description)
    437438        for milestone in milestones:
    438439            uid = '<%s/milestone/%s@%s>' % (req.base_path, milestone.name,
    439440                                            host)

in reply to:  2 comment:5 by Thijs Triemstra <lists@…>, 14 years ago

Replying to rblank:

Replying to Thijs Triemstra <lists@…>:

Pygments could provide that information?

Pygments? WrongTrac? :)

Ugh, pytz! :) What I meant was the timezone data in the .ics file should correspond to the timezone setting in the properties panel.

by Thijs Triemstra <lists@…>, 14 years ago

Attachment: ics-timezone-desc.patch added

comment:6 by Thijs Triemstra <lists@…>, 14 years ago

Keywords: review added
Summary: Add ics timezone[PATCH] Add ics timezone

Attached patch adds the timezone if found in the session and project description for calendar description.

comment:7 by Remy Blank, 14 years ago

The timezone for the current user can be retrieved with req.tz. It is given by the session if defined, otherwise by the default timezone defined in trac.ini, or the local timezone of the server.

comment:8 by Thijs Triemstra <lists@…>, 14 years ago

Thanks, a new patch:

  • trac/ticket/roadmap.py

     
    434434        write_prop('METHOD', 'PUBLISH')
    435435        write_prop('X-WR-CALNAME',
    436436                   self.env.project_name + ' - ' + _('Roadmap'))
     437        write_prop('X-WR-CALDESC', self.env.project_description)
     438        write_prop('X-WR-TIMEZONE', str(req.tz))
     439
    437440        for milestone in milestones:
    438441            uid = '<%s/milestone/%s@%s>' % (req.base_path, milestone.name,
    439442                                            host)

comment:9 by Remy Blank, 14 years ago

Owner: set to Remy Blank

Thanks, I'll apply.

comment:10 by Remy Blank, 14 years ago

Resolution: fixed
Status: newclosed

Patch applied in [10177]. Thanks!

comment:11 by Remy Blank, 14 years ago

Owner: changed from Remy Blank to Thijs Triemstra <lists@…>

comment:12 by Remy Blank, 14 years ago

Release Notes: modified (diff)

comment:13 by Thijs Triemstra, 13 years ago

Keywords: review removed
Owner: changed from Thijs Triemstra <lists@…> to Thijs Triemstra

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Thijs Triemstra.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Thijs Triemstra 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.