{"issue":{"created_at":"2011-11-29T16:14:26Z","state":"open","updated_at":"2011-11-29T16:14:30Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","login":"importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":4,"body":"In der Berechung der Intervalle ist in meinen Augen ein Fehler drin.\n(Datei system/modules/calendar/Events.php, Zeilen: 151 ff):\n\n```\nswitch ($arrRepeat['unit'])\n{\n\tcase 'days':\t\t$multiplier = 86400;\n\t\t\t\tbreak;\n\n\tcase 'weeks':\t\t$multiplier = 604800;\n\t\t\t\tbreak;\n\n\tcase 'months':\t\t$multiplier = (date('t', $objEvents->startTime)) * 86400;\n\t\t\t\tbreak;\n\n\tcase 'years':\t\tif (date('n', $objEvents->startTime) < 3)\n\t\t\t\t  $multiplier = date('L', $objEvents->startTime) ? 31622400 : 31536000;\n\t\t\t\telse\n\t\t\t\t  $multiplier = ((date('Y', $objEvents->startTime) % 4) == 3) ? 31622400 : 31536000;\n\t\t\t\tbreak;\n\n\tdefault:\t\t$multiplier = 0;\n\t\t\t\tbreak(2);\n}\n$objEvents->startTime += ($multiplier * $arrRepeat['value']);\n```\n\nFür Intervalle von Monaten und Jahren, wenn das Intervall > 1 ist, werden die Timestamp-Differenzen falsch gerechnet.\n\nBeispiel:\nTermin: 21.1.2009, Intervall 3 Monate\ndann wird für den 2. Termin in $mulitplier die Sekunden für den **aktuellen** Monat berechnet, dann aber einfach mal Anzahl der Monate genommen, d.h. die nächsten 3 Monate sind alle 31 Tage lang (wie der Januar).\nGenauso verhält es sich mit Intervallen von mehreren Jahren bezügl. Schaltjahr.\n\n--- _Originally created by do_while on January 21st, 2009, at 10:45am (ID 432)_","assignee":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"id":2386593,"number":432,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[{"name":"backend","color":"e6e6e6","url":"https://api.github.com/repos/contao/import/labels/backend"},{"name":"Defect","color":"bd2c00","url":"https://api.github.com/repos/contao/import/labels/Defect"}],"title":"Rechenfehler bei wiederkehrenden Termine (Calendar)","closed_at":null,"html_url":"https://github.com/contao/import/issues/432","url":"https://api.github.com/repos/contao/import/issues/432","milestone":{"created_at":"2011-11-29T15:29:29Z","state":"open","closed_issues":33,"due_on":null,"creator":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"number":6,"description":"TYPOlight 2.6.4 (maintenance release)","title":"2.6.4","url":"https://api.github.com/repos/contao/import/milestones/6","open_issues":1}},"action":"created","comment":{"created_at":"2011-11-29T16:14:30Z","updated_at":"2011-11-29T16:14:30Z","user":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"--- _Originally completed on January 21st, 2009, at 02:19pm_","id":2933451,"url":"https://api.github.com/repos/contao/import/issues/comments/2933451"}}