Creating/editing a recurring event makes it an all-day event.



  • Hey,

    Using DAVdroid/1.10.1.1-gplay, editing or creating a recurring event makes all occurrences an all-day event. I tried daily, weekly and monthly events with 10 repetitions. While editing I chose to apply to all occurrences. Editing a single occurrence later also does not work and makes it an all-day event too.

    How to reproduce

    1. Create an event
    2. The local calendar app shows it correctly
    3. Sync
    4. The event is uploaded and the local calendar is updated with an all-day event replacing the exact time of day you have specified

    The following is what gets uploaded for a weekly recurring event on wednesday from 8-9 o'clock:

    PUT /path/to/event.ics HTTP/1.1
    If-None-Match: *
    Content-Type: text/calendar;charset=utf-8
    Content-Length: 3676
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: DAVdroid/1.10.1.1-gplay (1/20/18; dav4android; okhttp3) Android/7.0
    Accept-Language: en-US, en;q=0.7, *;q=0.5
    
    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:+//IDN bitfire.at//DAVdroid/1.10.1.1-gplay ical4j/2.x
    BEGIN:VEVENT
    DTSTAMP:20180307T095402Z
    UID:f3bc7f44-00c7-4601-b913-8c6b335bcf8c
    SUMMARY:Schrauwen6
    DTSTART;TZID=Europe/Luxembourg:20180321T080000
    DURATION:PT3600S
    RRULE:FREQ=WEEKLY;WKST=MO;COUNT=10;INTERVAL=1;BYDAY=WE
    STATUS:TENTATIVE
    BEGIN:VALARM
    TRIGGER:-PT10M
    ACTION:DISPLAY
    DESCRIPTION:Schrauwen6
    END:VALARM
    END:VEVENT
    BEGIN:VTIMEZONE
    TZID:Europe/Luxembourg
    TZURL:http://tzurl.org/zoneinfo/Europe/Luxembourg
    X-LIC-LOCATION:Europe/Luxembourg
    BEGIN:DAYLIGHT
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0200
    TZNAME:CEST
    DTSTART:19810329T020000
    RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
    END:DAYLIGHT
    BEGIN:STANDARD
    TZOFFSETFROM:+0200
    TZOFFSETTO:+0100
    TZNAME:CET
    DTSTART:19961027T030000
    RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
    END:STANDARD
    BEGIN:STANDARD
    TZOFFSETFROM:+002436
    TZOFFSETTO:+0100
    TZNAME:CET
    DTSTART:19040601T000000
    RDATE:19040601T000000
    END:STANDARD
    BEGIN:DAYLIGHT
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0200
    TZNAME:CEST
    DTSTART:19160514T230000
    RDATE:19160514T230000
    RDATE:19170428T230000
    RDATE:19180415T020000
    RDATE:19450402T020000
    RDATE:19460519T020000
    RDATE:19770403T020000
    RDATE:19780402T020000
    RDATE:19790401T020000
    RDATE:19800406T020000
    END:DAYLIGHT
    BEGIN:STANDARD
    TZOFFSETFROM:+0200
    TZOFFSETTO:+0100
    TZNAME:CET
    DTSTART:19161001T010000
    RDATE:19161001T010000
    RDATE:19170917T010000
    RDATE:19180916T030000
    RDATE:19440918T030000
    RDATE:19450916T030000
    RDATE:19461007T030000
    RDATE:19770925T030000
    RDATE:19781001T030000
    RDATE:19790930T030000
    RDATE:19800928T030000
    RDATE:19810927T030000
    RDATE:19820926T030000
    RDATE:19830925T030000
    RDATE:19840930T030000
    RDATE:19850929T030000
    RDATE:19860928T030000
    RDATE:19870927T030000
    RDATE:19880925T030000
    RDATE:19890924T030000
    RDATE:19900930T030000
    RDATE:19910929T030000
    RDATE:19920927T030000
    RDATE:19930926T030000
    RDATE:19940925T030000
    RDATE:19950924T030000
    END:STANDARD
    BEGIN:STANDARD
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0000
    TZNAME:WET
    DTSTART:19181125T010000
    RDATE:19181125T010000
    RDATE:19191005T040000
    RDATE:19201024T030000
    RDATE:19211026T030000
    RDATE:19221008T020000
    RDATE:19231007T030000
    RDATE:19241005T020000
    RDATE:19251004T020000
    RDATE:19261003T020000
    RDATE:19271002T020000
    RDATE:19281007T020000
    RDATE:19291006T040000
    RDATE:19301005T040000
    RDATE:19311004T040000
    RDATE:19321002T040000
    RDATE:19331008T040000
    RDATE:19341007T040000
    RDATE:19351006T040000
    RDATE:19361004T040000
    RDATE:19371003T040000
    RDATE:19381002T040000
    RDATE:19391119T040000
    END:STANDARD
    BEGIN:DAYLIGHT
    TZOFFSETFROM:+0000
    TZOFFSETTO:+0100
    TZNAME:WEST
    DTSTART:19190302T000000
    RDATE:19190302T000000
    RDATE:19200215T000000
    RDATE:19210315T000000
    RDATE:19220326T000000
    RDATE:19230422T000000
    RDATE:19240330T000000
    RDATE:19250406T000000
    RDATE:19260418T000000
    RDATE:19270410T000000
    RDATE:19280415T000000
    RDATE:19290421T000000
    RDATE:19300413T030000
    RDATE:19310419T030000
    RDATE:19320403T030000
    RDATE:19330326T030000
    RDATE:19340408T030000
    RDATE:19350331T030000
    RDATE:19360419T030000
    RDATE:19370404T030000
    RDATE:19380327T030000
    RDATE:19390416T030000
    RDATE:19400225T030000
    END:DAYLIGHT
    BEGIN:DAYLIGHT
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0200
    TZNAME:WEST
    DTSTART:19400514T030000
    RDATE:19400514T030000
    RDATE:19430329T020000
    RDATE:19440403T020000
    END:DAYLIGHT
    BEGIN:STANDARD
    TZOFFSETFROM:+0200
    TZOFFSETTO:+0100
    TZNAME:WET
    DTSTART:19421102T030000
    RDATE:19421102T030000
    RDATE:19431004T030000
    END:STANDARD
    BEGIN:STANDARD
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0100
    TZNAME:CET
    DTSTART:19770101T000000
    RDATE:19770101T000000
    END:STANDARD
    END:VTIMEZONE
    END:VCALENDAR
    

    Trying the same thing in Thunderbird/Lightning looks more reasonable:

    BEGIN:VCALENDAR
    PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
    VERSION:2.0
    BEGIN:VTIMEZONE
    TZID:Europe/Berlin
    BEGIN:DAYLIGHT
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0200
    TZNAME:CEST
    DTSTART:19700329T020000
    RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
    END:DAYLIGHT
    BEGIN:STANDARD
    TZOFFSETFROM:+0200
    TZOFFSETTO:+0100
    TZNAME:CET
    DTSTART:19701025T030000
    RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
    END:STANDARD
    END:VTIMEZONE
    BEGIN:VEVENT
    LAST-MODIFIED:20180307T094012Z
    DTSTAMP:20180307T094012Z
    UID:c4bbfa56-ea21-41b6-aa79-f4b3100b87c6
    SUMMARY:schrauwen2
    PRIORITY:5
    RRULE:FREQ=WEEKLY;UNTIL=20180418;BYDAY=WE
    DTSTART;TZID=Europe/Berlin:20180307T100000
    DTEND;TZID=Europe/Berlin:20180307T110000
    SEQUENCE:1
    TRANSP:OPAQUE
    X-MOZ-GENERATION:3
    END:VEVENT
    END:VCALENDAR
    

    Here's the debug info (sorry can't share any URLs or identities)

    --- BEGIN DEBUG INFO ---
    
    SOFTWARE INFORMATION
    Package: at.bitfire.davdroid
    Version: 1.10.1.1-gplay (206) from Jan 20, 2018
    Installed from: com.android.vending
    JB Workaround installed: no
    
    CONNECTIVITY (at the moment)
    Active connection: mobile, CONNECTED
    
    CONFIGURATION
    Power saving disabled: no
    android.permission.READ_CONTACTS permission: denied
    android.permission.WRITE_CONTACTS permission: denied
    android.permission.READ_CALENDAR permission: granted
    android.permission.WRITE_CALENDAR permission: granted
    org.dmfs.permission.READ_TASKS permission: denied
    org.dmfs.permission.WRITE_TASKS permission: denied
    System-wide synchronization: manually
    Account: 
      Address book sync. interval: 240 min
      Calendar     sync. interval: 240 min
      OpenTasks    sync. interval: —
      WiFi only: false
      [CardDAV] Contact group method: GROUP_VCARDS
      [CalDAV] Time range (past days): 90
               Manage calendar colors: false
    
    SQLITE DUMP
    android_metadata
    	|  locale |
    	|  en_US |
    ----------
    services
    	|  _id | accountName | service | principal |
    	|  1 | 
    	|  2 | 
    ----------
    sqlite_sequence
    	|  name | seq |
    	|  services | 2 |
    	|  homesets | 2 |
    	|  collections | 24 |
    ----------
    homesets
    	|  _id | serviceID | url |
    	|  1 | 1 
    	|  2 | 2 
    ----------
    collections
    	|  _id | serviceID | type | url | readOnly | forceReadOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | source | sync |
    	|  1 | 1 | 
    	|  2 | 1 | 
    	|  3 | 1 | 
    	|  4 | 2 | 
    	|  5 | 2 | 
    	|  6 | 2 | 
    	|  7 | 2 |  
    	|  8 | 2 | 
    	|  9 | 2 | 
    	|  10 | 2 |
    	|  11 | 2 |
    	|  12 | 2 |
    	|  13 | 2 |
    	|  14 | 2 |
    	|  15 | 2 |
    	|  16 | 2 |
    	|  17 | 2 |
    	|  18 | 2 |
    	|  19 | 2 |
    	|  20 | 2 |
    	|  21 | 2 |
    	|  22 | 2 |
    	|  23 | 2 |
    	|  24 | 2 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 7.0 (NRD90M.J730FXXU1AQI5)
    Device: samsung SM-J730F (j7y17lte)
    
    --- END DEBUG INFO ---
    

    Server is MDaemon Email Server

    Thanks,
    Marki


  • developer

    Hello,

    @marki said in Creating/editing a recurring event makes it an all-day event.:

    Using DAVdroid/1.10.1.1-gplay, editing or creating a recurring event makes all occurrences an all-day event. I tried daily, weekly and monthly events with 10 repetitions. While editing I chose to apply to all occurrences. Editing a single occurrence later also does not work and makes it an all-day event too.

    How to reproduce

    1. Create an event
    2. The local calendar app shows it correctly
    3. Sync
    4. The event is uploaded and the local calendar is updated with an all-day event replacing the exact time of day you have specified

    Is it possible that the server doesn't understand the event and converts it to an all-day event? The event which is uploaded by DAVdroid looks fine:

    DTSTART;TZID=Europe/Luxembourg:20180321T080000

    Event start time: 21 Mar 2018 08:00:00 Europe/Luxembourg

    DURATION:PT3600S

    Event duration: one hour

    RRULE:FREQ=WEEKLY;WKST=MO;COUNT=10;INTERVAL=1;BYDAY=WE

    Every Wednesday, 10 times.

    Trying the same thing in Thunderbird/Lightning looks more reasonable:

    Why?

    PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
    BEGIN:VEVENT
    RRULE:FREQ=WEEKLY;UNTIL=20180418;BYDAY=WE

    Every Wednesday until 18 Mar 2018

    DTSTART;TZID=Europe/Berlin:20180307T100000

    Event start time: 7 Mar 2018 10:00:00 Europe/Berlin

    DTEND;TZID=Europe/Berlin:20180307T110000

    Event end time: 11:00

    I don't see anything wrong here. My guess is that the server rewrites the event to an all-day event, maybe because of the Europe/Luxembourg time zone. Why you can try:

    1. After /path/to/event.ics has been put to the server, have a look at what you GET from the server. Is it still correct or is it an all-day event?

    2. Try another timezone on your Android device. For instance, use Europe/Berlin for a certain event and see whether the problem occurs for this event, too.

    3. If this doesn't help, send the whole sync logs to play@bitfire.at.



  • @rfc2822 said in Creating/editing a recurring event makes it an all-day event.:

    Trying the same thing in Thunderbird/Lightning looks more reasonable:

    Why?

    Yeah, I was confused by the whole definition of the timezone being included in the event (1916, 1917 etc.), my mistake.

    Indeed looking at what is returned from the server after sync is something like this:

    BEGIN:VCALENDAR
    PRODID:-//Alt-N Technologies Ltd//MDaemon 17.5.2
    VERSION:2.0
    METHOD:PUBLISH
    BEGIN:VEVENT
    UID:af4a2cd0-7ccd-4661-86c8-5bcc7d56ba78
    SEQUENCE:0
    DTSTAMP:20180307T214530Z
    SUMMARY:Schrauwem
    PRIORITY:5
    DTSTART;VALUE=DATE:20180110
    DTEND;VALUE=DATE:20180111
    TRANSP:OPAQUE
    RRULE:FREQ=WEEKLY;COUNT=10;BYDAY=WE
    BEGIN:VALARM
    ACTION:DISPLAY
    TRIGGER;VALUE=DURATION:-PT10M
    END:VALARM
    END:VEVENT
    END:VCALENDAR
    

    Clearly, the time is missing.
    I'll open a ticket with the server vendor.

    Cheers.