Uploaded image for project: 'Z-Push'
  1. Z-Push
  2. ZP-1285

Caldav time zone incorrectly converted

    Details

    • Type: Bug
    • Status: QA
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.3.8 beta2
    • Fix Version/s: 2.3.8
    • Component/s: None
    • Labels:
      None
    • Severity:
      Major

      Description

      The following is definitely wrong:

      {{02/09/2017 11:46:46 [14060] [DEBUG] [test] BackendCalDAV->Logon(): User 'test' is authenticated on CalDAV 'https://cudasystems.net:11443/davical/caldav.php/test
      02/09/2017 11:46:45 [14060] [DEBUG] [test]TimezoneUtil::GetFullTZFromTZName('America/Chicago'): Is a PHP TimeZone, converting
      02/09/2017 11:46:45 [14060] [DEBUG] [test] BackendCalDAV->_ParseVEventToSyncObject(): No organizeremail defined, using username
      02/09/2017 11:46:45 [14060] [WBXML] [test] O     <Perform>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O      <Add>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O       <ServerEntryId>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O       de7590c7-1159-4c6e-8148-f5d30
      8005552.ics
      02/09/2017 11:46:45 [14060] [WBXML] [test] O       </ServerEntryId>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O       <Data>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        <POOMCAL:Timezone>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        aAEAAAAoAEcATQBUAC0AMAA2ADoA
      MAAwACkAIABDAGUAbgB0AHIAYQBsACAAVABpAG0AZQAgACgAVQBTACAAYQBuAGQAAAsAAAABAAIAAAAA
      AAAAAAAAAAAoAEcATQBUAC0AMAA2ADoAMAAwACkAIABDAGUAbgB0AHIAYQBsACAAVABpAG0AZQAgACgA
      VQBTACAAYQBuAGQAAAMAAAACAAIAAAAAAAAAxP///w==
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        </POOMCAL:Timezone>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        <POOMCAL:DtStamp>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        20170902T164615Z
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        </POOMCAL:DtStamp>
      *02/09/2017 11:46:45 [14060] [WBXML] [test] O        <POOMCAL:StartTime>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        20170902T180000Z
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        </POOMCAL:StartTime>*
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        <POOMCAL:Subject>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        Bite me
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        </POOMCAL:Subject>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        <POOMCAL:UID>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        de7590c7-1159-4c6e-8148-f5d3
      08005552
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        </POOMCAL:UID>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        <POOMCAL:OrganizerEmail>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        test
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        </POOMCAL:OrganizerEmail>
      *02/09/2017 11:46:45 [14060] [WBXML] [test] O        <POOMCAL:EndTime>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        20170902T190000Z
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        </POOMCAL:EndTime>*
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        <POOMCAL:BusyStatus>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        2
      02/09/2017 11:46:45 [14060] [WBXML] [test] O        </POOMCAL:BusyStatus>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O       </Data>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O      </Add>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O     </Perform>
      02/09/2017 11:46:45 [14060] [WBXML] [test] O    </Folder>
      02/09/2017 11:46:45 [14060] [DEBUG] [test] FileStateMachine->SetState() written
      143 bytes on file: '/var/lib/z-push-test/8/3/androidc681242638-a42efc44-0873-439
      7-952e-33e9b2ce7e8d-2'}}
      

      The original event from the Davical server is here:

      davical=# select * from calendar_item where summary like '%fuck%';
       user_no |                        dav_name                         |             dav_etag             |                 uid                  |       created       |    last_modified    |       dtstamp       |        dtstart         |         dtend          | due |     summary      | location | description | priority | class  | transp | rrule | url | percent_complete |      tz_id      | status | completed | dav_id | collection_id | first_instance_start | last_instance_end
      ---------+---------------------------------------------------------+----------------------------------+--------------------------------------+---------------------+---------------------+---------------------+------------------------+------------------------+-----+------------------+----------+-------------+----------+--------+--------+-------+-----+------------------+-----------------+--------+-----------+--------+---------------+----------------------+-------------------
          1002 | /test/calendar/de7590c7-1159-4c6e-8148-f5d308005552.ics | c731b1d5f31695f65dc1afc1c904be88 | de7590c7-1159-4c6e-8148-f5d308005552 | 2017-09-02 16:46:01 | 2017-09-02 16:46:15 | 2017-09-02 16:46:15 | 2017-09-02 12:00:00-05 | 2017-09-02 13:00:00-05 |     | Bite me |          |             |          | PUBLIC | OPAQUE |       |     |                  | America/Chicago |        |           |   6230 |          2130 |                      |
      (1 row)
      

      Note the start time – 12:00 Chicago time, and the time zone is correctly set yet when the conversion is done to the ActiveSync format (and Zulu time) it's wrong.

      This results in ALL calendar items from other than the remote being wrong on their start times by exactly one hour (into the future)

      It appears this may be related to not accounting for DST properly.....

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tickerguy Karl Denninger
                Reporter:
                tickerguy Karl Denninger
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: