rfc5545

How to create an ical duration field in Django?

烈酒焚心 提交于 2019-12-12 01:16:05
问题 I use a Django model that I register with the admin site. One of the fields of my model represents a duration. I would like to use the DateTimeField, but instead of saving the value to a datetime in the database, I would like to save it as varchar, formatted according to RFC5545 (ical) (e.g., a duration of 1 day 1 hour 1 min 1 sec would be stored as "P1DT1H1M1S"). How would I do this? Should I overwrite the DateTimeField? 回答1: You could create a custom Django field for it instead of

iCal feed all day events blank out entire day

一笑奈何 提交于 2019-12-11 14:54:38
问题 I am using a very old version of Telerik RadScheduler that exports appointments to an ics file so they can be fed to an iPhone. This is the telerik code: TimeZoneInfo localZone = TimeZoneInfo.Local; TimeSpan ts = localZone.BaseUtcOffset; return RadScheduler.ExportToICalendar(scheduler.Appointments, ts);` My server is in GMT, my iPhone is in NZDT (+13), my appointments are stored in UTC. I have some all day appointments that are midnight til midnight NZDT time. They are exporting like this:

Java, ICS calendar format not showing time when imported in Outlook or Thunderbird

China☆狼群 提交于 2019-12-11 12:16:23
问题 I am working on a Java project in which I am creating an ICS file and there is something wrong with date and time. Whenever I import the ICS file, I want to show the startTime of event and endTime of Event in the ICS file. I tried using the constructor which contains endTime as well, no luck, still shows 00:00. The below code I am using to generate an ICS file and below that is the content of the ICS file. Code : Calendar icsCalendar = new Calendar(); icsCalendar.getProperties().add(Version

iCalendar RFC 2445 Section 4.1 Content Folding

匆匆过客 提交于 2019-12-11 05:14:40
问题 I am creating a simple iCalendar using C# and found that the Content Folding per Section 4.1 of RFC 2445 to be quite a headache (for me :-). http://www.apps.ietf.org/rfc/rfc2445.html#sec-4.1 For long lines, you are to escape some characters (backslash, semi-colon, comma and newline, I believe) and then fold it so that no line is longer than 75 octets. I found several straight forward way of doing this on the web. The simplest is to replace the characters in question with escaped version and

“object has no attribute” in custom Django model field

我怕爱的太早我们不能终老 提交于 2019-12-11 03:46:56
问题 I am trying to create a Django model field that represents a duration with days, hours, minutes and seconds text input fields in the HTML, and stores the duration in the db using the ical format (RFC5545). (this is related to my question on How to create an ical duration field in Django?) Here is my approach: Thanks bakkal and Pol. Below is what I came up with. from django.db import models from icalendar.prop import vDuration from django.forms.widgets import MultiWidget from django.forms

can/should iCal property parametrs be escaped?

孤者浪人 提交于 2019-12-10 02:31:18
问题 specifically, the CN (common name) parameter, e.g. ORGANIZER;CN=John Doe,Eng:mailto:jd@some.com The RFC is vague on this, IMHO. It is very clear about property values of type TEXT, but for this parameter it just says " The parameter value is text ". Anyways, the escaping specified for TEXT type doesn't seem complete for parameter values (e.g. ':' is not escaped). thanks a lot! 回答1: Davka, Yes, parameter values can be escaped by surrounding the value in double-quotes. Parameter values must be

Icalendar ICS update not working in google calendar

回眸只為那壹抹淺笑 提交于 2019-12-08 19:46:04
问题 I have some trouble with the ICS attachment to Gmail/Google calendar addresses. When I have to edit an event I send an update by mail with an ICS file with the same UID of the original event. However, GCalendar adds a second event. How can I overcome this? This is first ICS file content: BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VEVENT DTSTART:20130425T090000 DTEND:20130425T100000 DTSTAMP:20130206T101100 ORGANIZER;CN=Test test:mailto:test@test.com ATTENDEE:test@test

Formatting time for ical export

随声附和 提交于 2019-12-08 17:34:22
问题 I have created a calendar in jquery that exports to ical. However, I am having some issues with the datetime. The ical export script expects the date/time in this format: 19970714T170000Z. Does anybody know what this is and how I should prepare my string? Thanks 回答1: Reading the RFC (link) gives : 3.3.5. Date-Time [...] date-time = date "T" time The "DATE-TIME" value type expresses time values in three forms: FORM #1: DATE WITH LOCAL TIME For example, the following represents January 18, 1998

Scheduling a monthly event “Every Nth Weekday” using RFC 5545 recurrence rule

a 夏天 提交于 2019-12-07 02:24:22
问题 I'm trying to replicate some scheduling functionality in Google Calendar in C# using the RFC5545 recurrence rule. There are two options for scheduling monthly with Google calendar, either by every Nth day month, ie: Every 10th day of the month every 1 months , this will obviously occur regardless of the week day. My recurrence rule for this is: FREQ=MONTHLY;BYMONTHDAY=10 The other option is to repeat the event on every Nth weekday, ie: " Every second Sunday every one months , this is the one

Does icalendar support HTML and CSS?

那年仲夏 提交于 2019-12-06 15:42:53
I am attempting to create a ICalendar with a html description using the X-ALT-DESC;FMTTYPE=text/html: but it does not appear to support inline CSS for layout/styling is there anyway of making CSS work within an icalendar? RFC 5545 (the iCalendar specification) allows you to use HTML, but that's a different thing from the calendar clients supporting it. I suspect that you'll find it rare that any of the non-browser-based calendars will do so. As opposed to what jgm implied, the RFC5545 does not have provisions for html. The only back-door is via the ALTREP parameter (see RFC for more details )