New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0006296: Calendar.import shifts dates upon import from ics files #3200

Closed
Gloirin opened this Issue Jun 9, 2018 · 14 comments

Comments

Projects
None yet
1 participant
@Gloirin

Gloirin commented Jun 9, 2018

Reported by weberho on 20 Apr 2012 15:38

Version: Milan (2012-03-2)

Some records from an ics file with birthdays are no imported correctly. Instead of "1970-10-25" the example is imported as "16.08.2012 start at 10:33".

I'm using the "php tine20.php -v --method=Calendar.import ... -v plugin=Calendar_Import_Ical" procedure.

Additional information: Example ics-file:

BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
X-WR-CALNAME:geburtstage
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VTIMEZONE
TZID:Africa/Ceuta
X-LIC-LOCATION:Africa/Ceuta
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
CREATED:20070828T120758Z
LAST-MODIFIED:20070828T120857Z
DTSTAMP:20070828T120857Z
UID:4f7e9c9b-0f21-4ce6-9205-c5c844121b34
SUMMARY:Test-Birthday
PRIORITY:0
RRULE:FREQ=YEARLY
DTSTART:19650827
DTEND:19650828
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR

@Gloirin Gloirin added this to the Kristina (2013.03.6) milestone Jun 9, 2018

@Gloirin Gloirin self-assigned this Jun 9, 2018

@Gloirin Gloirin closed this Jun 9, 2018

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin commented Jun 9, 2018

Related to #3133

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin commented Jun 9, 2018

Related to #3273

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin commented Jun 9, 2018

Related to #4933

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 10, 2018

Comment posted by weberho on 10 May 2012 19:40

I have finally prepeared a patch, which allows import of several calendars generated with the latest lightning version. A total of around 3000 meetings, birthdays and holidays could successfully be imported.

The patch should fix for several ical-import-issues including #6158;

Patch description:

  1. Fixed qCal to handle Dos and Unix linebreaks
  2. Fix qCal bug in timezone handling
  3. Fixed a bug that caused tine20 to ignore the timezone when importing records

Gloirin commented Jun 10, 2018

Comment posted by weberho on 10 May 2012 19:40

I have finally prepeared a patch, which allows import of several calendars generated with the latest lightning version. A total of around 3000 meetings, birthdays and holidays could successfully be imported.

The patch should fix for several ical-import-issues including #6158;

Patch description:

  1. Fixed qCal to handle Dos and Unix linebreaks
  2. Fix qCal bug in timezone handling
  3. Fixed a bug that caused tine20 to ignore the timezone when importing records
@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 10, 2018

Comment posted by pschuele on 13 May 2012 19:56

pushed the patch to gerrit for review: https://gerrit.tine20.org/tine20/#/c/615/

Gloirin commented Jun 10, 2018

Comment posted by pschuele on 13 May 2012 19:56

pushed the patch to gerrit for review: https://gerrit.tine20.org/tine20/#/c/615/

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 10, 2018

Comment posted by pschuele on 14 May 2012 07:24

the jenkins build failed, looks like the timezone is not taken into account:

phpunit-int:
[exec] PHPUnit 3.4.5 by Sebastian Bergmann.
[exec]
[exec] ............................................................ 60 / 1082
[exec] .............S.............................................. 120 / 1082
[exec] ............................................................ 180 / 1082
[exec] ..................................S......................... 240 / 1082
[exec] SSSSSSSSSSSSSSSS..........SSSSSSSSSSSSSSSSSSSSS............. 300 / 1082
[exec] ............................................................ 360 / 1082
[exec] ............................................................ 420 / 1082
[exec] ..............................................S............. 480 / 1082
[exec] ...............................S............................ 540 / 1082
[exec] ............SS.............................................. 600 / 1082
[exec] ............................................................ 660 / 1082
[exec] .........SSSSSSSSSSSSSS..................................... 720 / 1082
[exec] .....FF........................S............................ 780 / 1082
[exec] .......................................S.................... 840 / 1082
[exec] ............................................................ 900 / 1082
[exec] ............................................................ 960 / 1082
[exec] ......S....S...S.........I...........SSS.......S..I......SSS 1020 / 1082
[exec] S........................................................... 1080 / 1082
[exec] ..
[exec]
[exec] Time: 15:09, Memory: 313.25Mb
[exec]
[exec] There were 2 failures:
[exec]
[exec] 1) Calendar_Import_ICalTest::testImportSimpleFromString
[exec] Failed asserting that two strings are equal.
[exec] --- Expected
[exec] +++ Actual
[exec] @@ @@
[exec] -2008-11-05 15:00:00
[exec] +2008-11-05 14:00:00
[exec]
[exec]
[exec] 2) Calendar_Import_ICalTest::testImportSimpleFromFile
[exec] Failed asserting that two strings are equal.
[exec] --- Expected
[exec] +++ Actual
[exec] @@ @@
[exec] -2008-11-05 15:00:00
[exec] +2008-11-05 14:00:00
[exec]
[exec]
[exec] FAILURES!
[exec] Tests: 1082, Assertions: 4381, Failures: 2, Incomplete: 2, Skipped: 70.

Gloirin commented Jun 10, 2018

Comment posted by pschuele on 14 May 2012 07:24

the jenkins build failed, looks like the timezone is not taken into account:

phpunit-int:
[exec] PHPUnit 3.4.5 by Sebastian Bergmann.
[exec]
[exec] ............................................................ 60 / 1082
[exec] .............S.............................................. 120 / 1082
[exec] ............................................................ 180 / 1082
[exec] ..................................S......................... 240 / 1082
[exec] SSSSSSSSSSSSSSSS..........SSSSSSSSSSSSSSSSSSSSS............. 300 / 1082
[exec] ............................................................ 360 / 1082
[exec] ............................................................ 420 / 1082
[exec] ..............................................S............. 480 / 1082
[exec] ...............................S............................ 540 / 1082
[exec] ............SS.............................................. 600 / 1082
[exec] ............................................................ 660 / 1082
[exec] .........SSSSSSSSSSSSSS..................................... 720 / 1082
[exec] .....FF........................S............................ 780 / 1082
[exec] .......................................S.................... 840 / 1082
[exec] ............................................................ 900 / 1082
[exec] ............................................................ 960 / 1082
[exec] ......S....S...S.........I...........SSS.......S..I......SSS 1020 / 1082
[exec] S........................................................... 1080 / 1082
[exec] ..
[exec]
[exec] Time: 15:09, Memory: 313.25Mb
[exec]
[exec] There were 2 failures:
[exec]
[exec] 1) Calendar_Import_ICalTest::testImportSimpleFromString
[exec] Failed asserting that two strings are equal.
[exec] --- Expected
[exec] +++ Actual
[exec] @@ @@
[exec] -2008-11-05 15:00:00
[exec] +2008-11-05 14:00:00
[exec]
[exec]
[exec] 2) Calendar_Import_ICalTest::testImportSimpleFromFile
[exec] Failed asserting that two strings are equal.
[exec] --- Expected
[exec] +++ Actual
[exec] @@ @@
[exec] -2008-11-05 15:00:00
[exec] +2008-11-05 14:00:00
[exec]
[exec]
[exec] FAILURES!
[exec] Tests: 1082, Assertions: 4381, Failures: 2, Incomplete: 2, Skipped: 70.

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 10, 2018

Comment posted by weberho on 14 May 2012 10:03

This is strange. Input value is "DTSTART:20081105T150000Z" which means UTC; What timezones are used by the jenkins tool?

When I do a manual import of event 3632597 here at my system, I see the meeting at 16:00, which is correct, because in November it's Standard Central Europe Time (UTC+1); "2008-11-05 15:00:00" is correctly inserted into the database, too.

I'm quite sure, that the difference is caused by the fix on Calendar/Import/Ical.php line 204, which caused the date/time conversion to be ignored.

Gloirin commented Jun 10, 2018

Comment posted by weberho on 14 May 2012 10:03

This is strange. Input value is "DTSTART:20081105T150000Z" which means UTC; What timezones are used by the jenkins tool?

When I do a manual import of event 3632597 here at my system, I see the meeting at 16:00, which is correct, because in November it's Standard Central Europe Time (UTC+1); "2008-11-05 15:00:00" is correctly inserted into the database, too.

I'm quite sure, that the difference is caused by the fix on Calendar/Import/Ical.php line 204, which caused the date/time conversion to be ignored.

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 10, 2018

Comment posted by weberho on 14 May 2012 11:04

Phillip, can you please tell me, what timezone you expect to be used for output within the failing tests!?

Gloirin commented Jun 10, 2018

Comment posted by weberho on 14 May 2012 11:04

Phillip, can you please tell me, what timezone you expect to be used for output within the failing tests!?

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 10, 2018

Comment posted by pschuele on 14 May 2012 11:22

the timezone should be UTC, too.

here is the file, that is used by the test, event uid 3632597 / dtstart is tested. i think, the test is working correctly as UTC should be default for imports.

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
CLASS:PUBLIC
CREATED:20081105T104258Z
DESCRIPTION:A discussion with Tyler about how everything is over coffee
and donuts. I imagine we'll probably talk about our personal projects.
DTEND:20081105T160000Z
DTSTAMP:20081105T104200Z
DTSTART:20081105T150000Z
LAST-MODIFIED:20081105T104258Z
SEQUENCE:0
SUMMARY:Meeting with Tyler at Starbucks
TRANSP:OPAQUE
UID:3632597
END:VEVENT
END:VCALENDAR

Gloirin commented Jun 10, 2018

Comment posted by pschuele on 14 May 2012 11:22

the timezone should be UTC, too.

here is the file, that is used by the test, event uid 3632597 / dtstart is tested. i think, the test is working correctly as UTC should be default for imports.

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
CLASS:PUBLIC
CREATED:20081105T104258Z
DESCRIPTION:A discussion with Tyler about how everything is over coffee
and donuts. I imagine we'll probably talk about our personal projects.
DTEND:20081105T160000Z
DTSTAMP:20081105T104200Z
DTSTART:20081105T150000Z
LAST-MODIFIED:20081105T104258Z
SEQUENCE:0
SUMMARY:Meeting with Tyler at Starbucks
TRANSP:OPAQUE
UID:3632597
END:VEVENT
END:VCALENDAR

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 10, 2018

Comment posted by weberho on 14 May 2012 11:46

I have found that; importing that in my local installation gives (as explained above) the correct entry; Therefore I'm not sure, what happens here...

Gloirin commented Jun 10, 2018

Comment posted by weberho on 14 May 2012 11:46

I have found that; importing that in my local installation gives (as explained above) the correct entry; Therefore I'm not sure, what happens here...

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 10, 2018

Comment posted by pschuele on 29 Aug 2012 15:56

see https://gerrit.tine20.org/tine20/#/c/615/

but i think we won't fix this as qcal is going to be replaced soon.

Gloirin commented Jun 10, 2018

Comment posted by pschuele on 29 Aug 2012 15:56

see https://gerrit.tine20.org/tine20/#/c/615/

but i think we won't fix this as qcal is going to be replaced soon.

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 10, 2018

Comment posted by weberho on 23 May 2013 11:30

@pschuele: You have merged most of my changes with

https://gerrit.tine20.org/tine20/#/c/2019/
https://gerrit.tine20.org/tine20/#/c/1997/

There are still some outstanding issues I have fixed in the patch, which I upload in a newer version here.

Gloirin commented Jun 10, 2018

Comment posted by weberho on 23 May 2013 11:30

@pschuele: You have merged most of my changes with

https://gerrit.tine20.org/tine20/#/c/2019/
https://gerrit.tine20.org/tine20/#/c/1997/

There are still some outstanding issues I have fixed in the patch, which I upload in a newer version here.

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 10, 2018

Comment posted by cweiss on 17 Jul 2013 07:54

ical is now based on converters, isshue should be solved.

if not, please reopen

Gloirin commented Jun 10, 2018

Comment posted by cweiss on 17 Jul 2013 07:54

ical is now based on converters, isshue should be solved.

if not, please reopen

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 10, 2018

Comment posted by pschuele on 9 Nov 2017 16:48

merged the patch.

and we still use qcal for imports :( see #6448

Gloirin commented Jun 10, 2018

Comment posted by pschuele on 9 Nov 2017 16:48

merged the patch.

and we still use qcal for imports :( see #6448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment