.ics Calendar Event off by one day
Results 1 to 5 of 5

Thread: .ics Calendar Event off by one day

  1. #1
    Banned
    Join Date
    Aug 2001
    Location
    Yes
    Posts
    4,429

    .ics Calendar Event off by one day

    I have something strange going on: I have a .ics Calendar Event (see below).
    What's weird is that if I set a date, the actual date it puts in the calendar is one day earlier. For the example below, I set it with a date of April 30, but when I open the file, it's got a date of April 29

    It's not that big of a deal (I can just set the date one day ahead), but I thought it was kind of strange...

    Code:
    BEGIN:VCALENDAR
    VERSION:1.0
    BEGIN:VEVENT
    DTSTART:20090430
    DTEND:20090430
    SUMMARY:tet
    LOCATION:test
    DESCRIPTION:tet
    PRIORITY:3
    END:VEVENT
    END:VCALENDAR

  2. #2
    AO's Filibustier Cheap Scotch Ron's Avatar
    Join Date
    Nov 2008
    Location
    Swamps of Jersey
    Posts
    378
    Might this be the issue?


    RFC 2445, section 4.8.2.2:

    4.8.2.2 Date/Time End

    Property Name: DTEND

    Purpose: This property specifies the date and time that a calendar
    component ends.

    Value Type: The default value type is DATE-TIME. The value type can
    be set to a DATE value type.

    Property Parameters: Non-standard, value data type, time zone
    identifier property parameters can be specified on this property.

    Conformance: This property can be specified in "VEVENT" or
    "VFREEBUSY" calendar components.

    Description: Within the "VEVENT" calendar component, this property
    defines the date and time by which the event ends. The value MUST be
    later in time than the value of the "DTSTART" property.


    According to the RFC, DTEND must be greater than DTSTART. Which would
    seem to imply that in order to get "all day" behavior for a single VEVENT,
    DTEND = DTSTART + 1, not DTEND = DTSTART as it's currently interpreted.

    The behavior of "DTEND = DTSTART + 1" being one day in length is supported
    by Google Calendar, Microsoft Outlook, and Mozilla SunBird at the least (I
    have not yet tested other calendards).

    All of the iCal remote calendars I looked at that used VALUE=DATE also had
    DTEND as being DTSTART + 1 to signify a single day.
    In God We Trust....Everything else we backup.

  3. #3
    Banned
    Join Date
    Aug 2001
    Location
    Yes
    Posts
    4,429
    When I saw your post, I immediately thought "That's gotta be it!"

    Until I changed the DTSTART to 04292009 and the DTEND to 04302009 to test, and now it's trying to populate the calendar with an event starting on 04/28/2009 and ending on 04/29/2009 - it's still off by 1 day! Now I'm determined to find out what's going on with this...

  4. #4
    AO's Filibustier Cheap Scotch Ron's Avatar
    Join Date
    Nov 2008
    Location
    Swamps of Jersey
    Posts
    378
    Try adding the time to the dates. e.g.

    DTSTART;TZID=US/Pacific:20090430T150000
    DTEND;TZID=US/Pacific:20090430T160000
    In God We Trust....Everything else we backup.

  5. #5
    Banned
    Join Date
    Aug 2001
    Location
    Yes
    Posts
    4,429
    Adding the time finally made it get the date right - thanks!

Similar Threads

  1. Windows Error Messages
    By cheyenne1212 in forum Miscellaneous Security Discussions
    Replies: 7
    Last Post: February 1st, 2012, 01:51 PM
  2. Port List
    By ThePreacher in forum Miscellaneous Security Discussions
    Replies: 17
    Last Post: December 14th, 2006, 08:37 PM
  3. Replies: 1
    Last Post: November 30th, 2005, 11:24 PM
  4. Event Logs the easy way
    By Tedob1 in forum The Security Tutorials Forum
    Replies: 2
    Last Post: April 2nd, 2004, 03:27 PM
  5. Someone PLEASE HELP: (router;NIC;DHCP;IP)<-HELP
    By PhiDelt101 in forum General Computer Discussions
    Replies: 7
    Last Post: December 12th, 2003, 03:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides