Convert seconds to minutes when parsing alarm values (#4287)
This commit is contained in:
parent
7c565bff0c
commit
5a3468ac13
1 changed files with 6 additions and 0 deletions
|
@ -432,6 +432,12 @@ class libcalendaring extends rcube_plugin
|
|||
foreach ($m2 as $seg) {
|
||||
$prefix = $seg[2] == 'D' || $seg[2] == 'W' ? 'P' : 'PT';
|
||||
if ($seg[1] > 0) { // ignore zero values
|
||||
// convert seconds to minutes
|
||||
if ($seg[2] == 'S') {
|
||||
$seg[2] = 'M';
|
||||
$seg[1] = round($seg[1]/60);
|
||||
}
|
||||
|
||||
return array($seg[1], $m[1].$seg[2], $m[1].$seg[1].$seg[2], $m[1].$prefix.$seg[1].$seg[2]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue