Skip to content
Snippets Groups Projects
Commit 055fff46 authored by Frédéric Carretero's avatar Frédéric Carretero
Browse files

Correction du paramètre "length_sec" dans les templates de mail.

parent cafcc903
Branches
No related tags found
No related merge requests found
...@@ -179,8 +179,7 @@ class orderLib extends GtfLib{ ...@@ -179,8 +179,7 @@ class orderLib extends GtfLib{
function formatOrderEmail() { function formatOrderEmail() {
// Calcule la date et heure de fin // Calcule la date et heure de fin
list($iHours, $iMinutes, $iSeconds) = explode(':', $this->aFields['length_sec']); list($iHours, $iMinutes, $iSeconds) = explode(':', $this->aFields['length_sec']);
$oLengthSec = new DateInterval('PT' . intval($iHours) . 'H' . intval($iMinutes) . 'M' . intval($iSeconds) . 'S'); $this->aFields['length_sec'] = (intval($iHours) * 3600) + (intval($iMinutes) * 60) + intval($iSeconds);
$this->aFields['length_sec'] = $oLengthSec->format('%s');
if (!empty($this->aFields['execution_date']) && !empty($this->aFields['length_sec'])) if (!empty($this->aFields['execution_date']) && !empty($this->aFields['length_sec']))
$this->aFields['process_date'] = date_add(date_create($this->aFields['execution_date']), new DateInterval('PT' . intval($this->aFields['length_sec']) . 'S')); $this->aFields['process_date'] = date_add(date_create($this->aFields['execution_date']), new DateInterval('PT' . intval($this->aFields['length_sec']) . 'S'));
// Format des dates // Format des dates
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment