Merging from HEAD:
Repeat events are now created correctly even if the DST change boundary is crossed between repeats.
This commit is contained in:
+8
-3
@@ -216,9 +216,14 @@
|
||||
|
||||
if ($form->repeat) {
|
||||
for($i = 1; $i < $form->repeats; $i++) {
|
||||
// [pj]
|
||||
// This will not necessarily work correctly because of DST
|
||||
$form->timestart += 604800; // add one week
|
||||
// What's the DST offset for the previous repeat?
|
||||
$dst_offset_prev = dst_offset_on($form->timestart);
|
||||
|
||||
$form->timestart += WEEKSECS;
|
||||
|
||||
// If the offset has changed in the meantime, update this repeat accordingly
|
||||
$form->timestart += $dst_offset_prev - dst_offset_on($form->timestart);
|
||||
|
||||
/// Get the event id for the log record.
|
||||
$eventid = insert_record('event', $form, true);
|
||||
/// Log the event entry.
|
||||
|
||||
Reference in New Issue
Block a user