public function __construct(AriiSession $session) { $this->session = $session; // date par defaut $this->CurrentDate = date('Y-m-d'); $Site = $session->getSite(); $this->TZLocal = $Site['timezone']; // si le timezone est vide, on prend le timezone php if ($this->TZLocal == '') { $this->TZLocal = date_default_timezone_get(); } $target_offset = $this->getOffset($this->TZLocal); foreach ($session->getSpoolers() as $k => $v) { $s = $v['name']; $t = $v['timezone']; $this->TZSpooler[$s] = $t; $this->TZOffset[$s] = $target_offset - $this->getOffset($t); } // pour les spoolers par defaut en 1.5 $this->DefaultOffset = $this->getOffset($this->TZLocal); }
public function __construct(AriiSession $session, TranslatorInterface $translator) { $this->session = $session; // date par defaut $this->CurrentDate = date('Y-m-d'); $this->translator = $translator; $Site = $session->getSite(); $this->TZLocal = $Site['timezone']; // si le timezone est vide, on prend le timezone php if ($this->TZLocal == '') { $this->TZLocal = date_default_timezone_get(); } $target_offset = $this->getOffset($this->TZLocal); /* Devient inutile, les ordonnanceurs stockent les dates en GMT foreach ($session->getSpoolers() as $k=>$v) { $s = $v['name']; $t = $v['timezone']; $this->TZSpooler[$s] = $t; $this->TZOffset[$s] = $target_offset - $this->getOffset($t); } */ // pour les spoolers par defaut en 1.5 $this->DefaultOffset = $this->getOffset($this->TZLocal); }