Skip to content
Snippets Groups Projects
Commit 111bcc08 authored by SNA's avatar SNA
Browse files

Evol : ajout du timezone dans la config

parent c1940fc0
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,14 @@ class portal extends functions
$_SESSION['config']['unixserver'] = (string) $CONFIG->unixserver;
$_SESSION['config']['defaultpage'] = (string) $CONFIG->defaultpage;
$_SESSION['config']['defaultlang'] = (string) $CONFIG->defaultlanguage;
if(isset($CONFIG->default_timezone) && !empty($CONFIG->default_timezone))
{
$_SESSION['config']['default_timezone'] = (string) $CONFIG->default_timezone;
}
else
{
$_SESSION['config']['default_timezone'] = 'Europe/Paris';
}
if ($_SERVER['HTTPS'] == "on")
$protocol = "https";
else
......
<?php
session_name('maarch_entreprise');
session_start();
if(isset($_SESSION['config']['default_timezone']) && !empty($_SESSION['config']['default_timezone']))
{
ini_set('date.timezone', $_SESSION['config']['default_timezone']);
date_default_timezone_set($_SESSION['config']['default_timezone']);
}
else
{
ini_set('date.timezone', 'Europe/Paris');
date_default_timezone_set('Europe/Paris');
}
if(isset($_SESSION['config']['corepath']) && !empty($_SESSION['config']['corepath']))
{
chdir($_SESSION['config']['corepath']);
......@@ -15,7 +24,6 @@ if (isset($_SESSION['custom_override_id']) && !empty($_SESSION['custom_override_
}
elseif(isset($_SESSION['config']['corepath']) && !empty($_SESSION['config']['corepath']))
{
set_include_path($_SESSION['config']['corepath']);
}
......
......@@ -5,6 +5,7 @@
<tmppath>C:\xampp\htdocs\maarch_entreprise\tmp\</tmppath>
<defaultpage>C:\xampp\htdocs\maarch_entreprise\index.php</defaultpage>
<defaultlanguage>fr</defaultlanguage>
<default_timezone>Europe/Paris</default_timezone>
</CONFIG>
<BUSINESSAPPS>
<appid>maarch_entreprise</appid> <!-- same name as the app directory -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment