diff --git a/config/app.php b/config/app.php index 18c615493..fad6a83a2 100644 --- a/config/app.php +++ b/config/app.php @@ -12,7 +12,7 @@ return [ 'log' => env('APP_LOG', 'single'), 'log_level' => env('APP_LOG_LEVEL', 'debug'), 'cache_lifetime' => env('APP_CACHE_LIFETIME', 60), - + 'timezone' => 'UTC', 'providers' => [ FilesystemServiceProvider::class, CacheServiceProvider::class, diff --git a/framework/src/Maveriks/WebApplication.php b/framework/src/Maveriks/WebApplication.php index 8b93a5a28..d619ecb8d 100644 --- a/framework/src/Maveriks/WebApplication.php +++ b/framework/src/Maveriks/WebApplication.php @@ -3,6 +3,7 @@ namespace Maveriks; use Bootstrap; +use Exception; use G; use Illuminate\Foundation\Http\Kernel; use Luracast\Restler\Format\UploadFormat; @@ -426,6 +427,16 @@ class WebApplication ); } + /** + * Define constants, setup configuration and initialize Laravel + * + * @param string $workspace + * @return bool + * @throws Exception + * + * @see run() + * @see workflow/engine/bin/cli.php + */ public function loadEnvironment($workspace = "") { define("PATH_SEP", DIRECTORY_SEPARATOR); @@ -467,24 +478,11 @@ class WebApplication define("PATH_CONTROLLERS", PATH_CORE . "controllers" . PATH_SEP); define("PATH_SERVICES_REST", PATH_CORE . "services" . PATH_SEP . "rest" . PATH_SEP); - G::defineConstants(); - $arraySystemConfiguration = System::getSystemConfiguration(); - - ini_set('date.timezone', $arraySystemConfiguration['time_zone']); //Set Time Zone - // set include path - set_include_path( - PATH_CORE . PATH_SEPARATOR . - PATH_THIRDPARTY . PATH_SEPARATOR . - PATH_THIRDPARTY . "pear" . PATH_SEPARATOR . - PATH_RBAC_CORE . PATH_SEPARATOR . - get_include_path() - ); - /* * Setting Up Workspace */ if (!file_exists(FILE_PATHS_INSTALLED)) { - throw new \Exception("Can't locate system file: " . FILE_PATHS_INSTALLED); + throw new Exception("Can't locate system file: " . FILE_PATHS_INSTALLED); } // include the server installed configuration @@ -496,17 +494,58 @@ class WebApplication define("PATH_TEMPORAL", PATH_C . "dynEditor/"); define("PATH_DB", PATH_DATA . "sites" . PATH_SEP); + // set include path + set_include_path( + PATH_CORE . PATH_SEPARATOR . + PATH_THIRDPARTY . PATH_SEPARATOR . + PATH_THIRDPARTY . "pear" . PATH_SEPARATOR . + PATH_RBAC_CORE . PATH_SEPARATOR . + get_include_path() + ); + + G::defineConstants(); + + $arraySystemConfiguration = System::getSystemConfiguration('', '', $workspace); + + //In community version the default value is 0 + $_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int)($arraySystemConfiguration['system_utc_time_zone']) == 1; + + define('DEBUG_SQL_LOG', $arraySystemConfiguration['debug_sql']); + define('DEBUG_TIME_LOG', $arraySystemConfiguration['debug_time']); + define('DEBUG_CALENDAR_LOG', $arraySystemConfiguration['debug_calendar']); + define('MEMCACHED_ENABLED', $arraySystemConfiguration['memcached']); + define('MEMCACHED_SERVER', $arraySystemConfiguration['memcached_server']); + define('SYS_SKIN', $arraySystemConfiguration['default_skin']); + define('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION', $arraySystemConfiguration['disable_download_documents_session_validation']); + define('TIME_ZONE', + (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) ? 'UTC' : $arraySystemConfiguration['time_zone']); + // Change storage path app()->useStoragePath(realpath(PATH_DATA)); app()->make(Kernel::class)->bootstrap(); restore_error_handler(); error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED); + //Overwrite with the Processmaker env.ini configuration used in production environments + //@todo: move env.ini configuration to .env + ini_set('display_errors', $arraySystemConfiguration['display_errors']); + ini_set('error_reporting', $arraySystemConfiguration['error_reporting']); + ini_set('short_open_tag', 'On'); //?? + ini_set('default_charset', 'UTF-8'); //?? + ini_set('memory_limit', $arraySystemConfiguration['memory_limit']); + ini_set('soap.wsdl_cache_enabled', $arraySystemConfiguration['wsdl_cache']); + ini_set('date.timezone', TIME_ZONE); //Set Time Zone + + date_default_timezone_set(TIME_ZONE); + + config(['app.timezone' => TIME_ZONE]); + Bootstrap::setLanguage(); Bootstrap::LoadTranslationObject((defined("SYS_LANG")) ? SYS_LANG : "en"); if (empty($workspace)) { + // If the workspace is empty the function should be return the control to the previous file return true; } @@ -520,24 +559,6 @@ class WebApplication exit(0); } - $arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace")); - - //Do not change any of these settings directly, use env.ini instead - ini_set('display_errors', $arraySystemConfiguration['display_errors']); - ini_set('error_reporting', $arraySystemConfiguration['error_reporting']); - ini_set('short_open_tag', 'On'); //?? - ini_set('default_charset', 'UTF-8'); //?? - ini_set('memory_limit', $arraySystemConfiguration['memory_limit']); - ini_set('soap.wsdl_cache_enabled', $arraySystemConfiguration['wsdl_cache']); - - define('DEBUG_SQL_LOG', $arraySystemConfiguration['debug_sql']); - define('DEBUG_TIME_LOG', $arraySystemConfiguration['debug_time']); - define('DEBUG_CALENDAR_LOG', $arraySystemConfiguration['debug_calendar']); - define('MEMCACHED_ENABLED', $arraySystemConfiguration['memcached']); - define('MEMCACHED_SERVER', $arraySystemConfiguration['memcached_server']); - define('SYS_SKIN', $arraySystemConfiguration['default_skin']); - define('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION', $arraySystemConfiguration['disable_download_documents_session_validation']); - require_once(PATH_DB . config("system.workspace") . "/db.php"); // defining constant for workspace shared directory @@ -591,17 +612,6 @@ class WebApplication \Propel::init(PATH_CONFIG . "databases.php"); - //Set Time Zone - /*----------------------------------********---------------------------------*/ - if (\PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) { - $_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int) ($arraySystemConfiguration['system_utc_time_zone']) == 1; - } - /*----------------------------------********---------------------------------*/ - - ini_set('date.timezone', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) ? 'UTC' : $arraySystemConfiguration['time_zone']); //Set Time Zone - - define('TIME_ZONE', ini_get('date.timezone')); - $oPluginRegistry = PluginRegistry::loadSingleton(); $attributes = $oPluginRegistry->getAttributes(); Bootstrap::LoadTranslationPlugins(defined('SYS_LANG') ? SYS_LANG : "en", $attributes); @@ -626,7 +636,7 @@ class WebApplication } return (isset($arrayConfig["api"]["version"]))? $arrayConfig["api"]["version"] : "1.0"; - } catch (\Exception $e) { + } catch (Exception $e) { throw $e; } } diff --git a/workflow/engine/bin/cron.php b/workflow/engine/bin/cron.php index 73f7dac89..5aa50b485 100644 --- a/workflow/engine/bin/cron.php +++ b/workflow/engine/bin/cron.php @@ -90,6 +90,9 @@ try { $e_all = (defined('E_STRICT'))? $e_all & ~E_STRICT : $e_all; $e_all = ($arraySystemConfiguration['debug'])? $e_all : $e_all & ~E_NOTICE; + //In community version the default value is 0 + $systemUtcTimeZone = (int)($arraySystemConfiguration['system_utc_time_zone']) == 1; + app()->useStoragePath(realpath(PATH_DATA)); app()->make(Kernel::class)->bootstrap(); restore_error_handler(); @@ -100,14 +103,18 @@ try { ini_set('default_charset', 'UTF-8'); ini_set('memory_limit', $arraySystemConfiguration['memory_limit']); ini_set('soap.wsdl_cache_enabled', $arraySystemConfiguration['wsdl_cache']); - ini_set('date.timezone', $arraySystemConfiguration['time_zone']); + ini_set('date.timezone', $systemUtcTimeZone ? 'UTC' : $arraySystemConfiguration['time_zone']); - define('DEBUG_SQL_LOG', $arraySystemConfiguration['debug_sql']); + define('DEBUG_SQL_LOG', $arraySystemConfiguration['debug_sql']); define('DEBUG_TIME_LOG', $arraySystemConfiguration['debug_time']); define('DEBUG_CALENDAR_LOG', $arraySystemConfiguration['debug_calendar']); - define('MEMCACHED_ENABLED', $arraySystemConfiguration['memcached']); - define('MEMCACHED_SERVER', $arraySystemConfiguration['memcached_server']); - define('TIME_ZONE', ini_get('date.timezone')); + define('MEMCACHED_ENABLED', $arraySystemConfiguration['memcached']); + define('MEMCACHED_SERVER', $arraySystemConfiguration['memcached_server']); + define('TIME_ZONE', ini_get('date.timezone')); + + date_default_timezone_set(TIME_ZONE); + + config(['app.timezone' => TIME_ZONE]); //CRON command options $arrayCommandOption = [ @@ -162,9 +169,7 @@ try { try { $cronSinglePath = PATH_CORE . 'bin' . PATH_SEP . 'cron_single.php'; - $workspace = ''; - $dateSystem = date('Y-m-d H:i:s'); $date = ''; $argvx = ''; @@ -192,8 +197,6 @@ try { if (!empty($date) && preg_match('/^' . '[1-9]\d{3}\-(?:0[1-9]|1[0-2])\-(?:0[1-9]|[12][0-9]|3[01])' . '(?:\s' . '(?:[0-1]\d|2[0-3])\:[0-5]\d\:[0-5]\d' . ')?$/', $date)) { eprintln('[Applying date filter: ' . $date . ']'); - } else { - $date = $dateSystem; } $counterw = 0; @@ -207,7 +210,7 @@ try { if (file_exists(PATH_DB . $entry . PATH_SEP . 'db.php')) { $counterw++; - passthru('php -f "' . $cronSinglePath . '" "' . base64_encode(PATH_HOME) . '" "' . base64_encode(PATH_TRUNK) . '" "' . base64_encode(PATH_OUTTRUNK) . '" ' . $cronName . ' ' . $entry . ' "' . $dateSystem . '" "' . $date . '" ' . $argvx); + passthru('php -f "' . $cronSinglePath . '" "' . base64_encode(PATH_HOME) . '" "' . base64_encode(PATH_TRUNK) . '" "' . base64_encode(PATH_OUTTRUNK) . '" ' . $cronName . ' ' . $entry . ' "' . $date . '" ' . $argvx); } } } @@ -219,7 +222,7 @@ try { $counterw++; - passthru('php -f "' . $cronSinglePath . '" "' . base64_encode(PATH_HOME) . '" "' . base64_encode(PATH_TRUNK) . '" "' . base64_encode(PATH_OUTTRUNK) . '" ' . $cronName . ' ' . $workspace . ' "' . $dateSystem . '" "' . $date . '" ' . $argvx); + passthru('php -f "' . $cronSinglePath . '" "' . base64_encode(PATH_HOME) . '" "' . base64_encode(PATH_TRUNK) . '" "' . base64_encode(PATH_OUTTRUNK) . '" ' . $cronName . ' ' . $workspace . ' "' . $date . '" ' . $argvx); } eprintln('Finished ' . $counterw . ' workspaces processed'); diff --git a/workflow/engine/bin/cron_single.php b/workflow/engine/bin/cron_single.php index 7324ddb97..9525d3420 100644 --- a/workflow/engine/bin/cron_single.php +++ b/workflow/engine/bin/cron_single.php @@ -31,7 +31,7 @@ ini_set('memory_limit', '512M'); try { //Verify data - if (count($argv) < 8) { + if (count($argv) < 7) { throw new Exception('Error: Invalid number of arguments'); } @@ -51,8 +51,7 @@ try { $pathOutTrunk = $argv[3]; $cronName = $argv[4]; $workspace = $argv[5]; - $dateSystem = $argv[6]; - $sNow = $argv[7]; //date + $now = $argv[6]; //date //Defines constants define('PATH_SEP', ($osIsLinux) ? '/' : '\\'); @@ -84,6 +83,9 @@ try { $e_all = (defined('E_STRICT')) ? $e_all & ~E_STRICT : $e_all; $e_all = ($arraySystemConfiguration['debug']) ? $e_all : $e_all & ~E_NOTICE; + //In community version the default value is 0 + $_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int)($arraySystemConfiguration['system_utc_time_zone']) == 1; + app()->useStoragePath(realpath(PATH_DATA)); app()->make(Kernel::class)->bootstrap(); restore_error_handler(); @@ -93,13 +95,18 @@ try { ini_set('short_open_tag', 'On'); ini_set('default_charset', 'UTF-8'); ini_set('soap.wsdl_cache_enabled', $arraySystemConfiguration['wsdl_cache']); - ini_set('date.timezone', $arraySystemConfiguration['time_zone']); + ini_set('date.timezone', $_SESSION['__SYSTEM_UTC_TIME_ZONE__'] ? 'UTC' : $arraySystemConfiguration['time_zone']); define('DEBUG_SQL_LOG', $arraySystemConfiguration['debug_sql']); define('DEBUG_TIME_LOG', $arraySystemConfiguration['debug_time']); define('DEBUG_CALENDAR_LOG', $arraySystemConfiguration['debug_calendar']); define('MEMCACHED_ENABLED', $arraySystemConfiguration['memcached']); define('MEMCACHED_SERVER', $arraySystemConfiguration['memcached_server']); + define('TIME_ZONE', ini_get('date.timezone')); + + date_default_timezone_set(TIME_ZONE); + + config(['app.timezone' => TIME_ZONE]); spl_autoload_register(['Bootstrap', 'autoloadClass']); @@ -230,23 +237,9 @@ try { define('SYS_SKIN', $conf->getConfiguration('SKIN_CRON', '')); } - //Set Time Zone - $systemUtcTimeZone = false; - - /*----------------------------------********---------------------------------*/ - if (PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) { - $systemUtcTimeZone = (int) ($arraySystemConfiguration['system_utc_time_zone']) == 1; - } - /*----------------------------------********---------------------------------*/ - - ini_set('date.timezone', ($systemUtcTimeZone) ? 'UTC' : $arraySystemConfiguration['time_zone']); //Set Time Zone - - define('TIME_ZONE', ini_get('date.timezone')); - - //UTC time zone - if ($systemUtcTimeZone) { - $sNow = convertToSystemUtcTimeZone($sNow); - $dateSystem = convertToSystemUtcTimeZone($dateSystem); + $dateSystem = date('Y-m-d H:i:s'); + if (empty($now)) { + $now = $dateSystem; } //Processing @@ -276,7 +269,7 @@ try { case 'timereventcron': $timerEvent = new \ProcessMaker\BusinessModel\TimerEvent(); - $timerEvent->startContinueCaseByTimerEvent($sNow, true); + $timerEvent->startContinueCaseByTimerEvent($now, true); break; case 'sendnotificationscron': sendNotifications(); @@ -334,7 +327,7 @@ function processWorkspace() function resendEmails() { global $argvx; - global $sNow; + global $now; global $dateSystem; if ($argvx != "" && strpos($argvx, "emails") === false) { @@ -344,9 +337,9 @@ function resendEmails() setExecutionMessage("Resending emails"); try { - $dateResend = $sNow; + $dateResend = $now; - if ($sNow == $dateSystem) { + if ($now == $dateSystem) { $arrayDateSystem = getdate(strtotime($dateSystem)); $mktDateSystem = mktime( @@ -399,7 +392,7 @@ function resendEmails() function unpauseApplications() { global $argvx; - global $sNow; + global $now; if ($argvx != "" && strpos($argvx, "unpause") === false) { return false; @@ -409,7 +402,7 @@ function unpauseApplications() try { $oCases = new Cases(); - $oCases->ThrowUnpauseDaemon($sNow, 1); + $oCases->ThrowUnpauseDaemon($now, 1); setExecutionResultMessage('DONE'); saveLog('unpauseApplications', 'action', 'Unpausing Applications'); @@ -543,10 +536,10 @@ function calculateAppDuration() } /*----------------------------------********---------------------------------*/ -function executeEvents($sLastExecution, $sNow = null) +function executeEvents($sLastExecution, $now = null) { global $argvx; - global $sNow; + global $now; $log = array(); @@ -559,15 +552,15 @@ function executeEvents($sLastExecution, $sNow = null) try { $oAppEvent = new AppEvent(); - saveLog('executeEvents', 'action', "Executing Events $sLastExecution, $sNow "); - $n = $oAppEvent->executeEvents($sNow, false, $log, 1); + saveLog('executeEvents', 'action', "Executing Events $sLastExecution, $now "); + $n = $oAppEvent->executeEvents($now, false, $log, 1); foreach ($log as $value) { $arrayCron = unserialize(trim(@file_get_contents(PATH_DATA . "cron"))); $arrayCron["processcTimeStart"] = time(); @file_put_contents(PATH_DATA . "cron", serialize($arrayCron)); - saveLog('executeEvents', 'action', "Execute Events : $value, $sNow "); + saveLog('executeEvents', 'action', "Execute Events : $value, $now "); } setExecutionMessage("|- End Execution events"); @@ -579,11 +572,11 @@ function executeEvents($sLastExecution, $sNow = null) } } -function executeScheduledCases($sNow = null) +function executeScheduledCases($now = null) { try { global $argvx; - global $sNow; + global $now; $log = array(); if ($argvx != "" && strpos($argvx, "scheduler") === false) { @@ -594,7 +587,7 @@ function executeScheduledCases($sNow = null) setExecutionResultMessage('PROCESSING'); $oCaseScheduler = new CaseScheduler(); - $oCaseScheduler->caseSchedulerCron($sNow, $log, 1); + $oCaseScheduler->caseSchedulerCron($now, $log, 1); foreach ($log as $value) { $arrayCron = unserialize(trim(@file_get_contents(PATH_DATA . "cron"))); @@ -611,35 +604,6 @@ function executeScheduledCases($sNow = null) } } -function convertToSystemUtcTimeZone($sNow) -{ - global $arraySystemConfiguration; - - $runDate = isset($sNow) ? $sNow : date('Y-m-d H:i:s'); - - $systemUtcTimeZone = false; - /*----------------------------------********---------------------------------*/ - if (PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) { - $systemUtcTimeZone = (int) ($arraySystemConfiguration['system_utc_time_zone']) == 1; - } - /*----------------------------------********---------------------------------*/ - - if ($systemUtcTimeZone) { - if (isset($sNow)) { - //as the $sNow param that comes from the command line doesn't specicy a time zone - //we assume that the user set this time using the server time zone so we use the gmdate - //function to convert it - $currentTimeZone = date_default_timezone_get(); - date_default_timezone_set($arraySystemConfiguration['time_zone']); - $runDate = gmdate('Y-m-d H:i:s', strtotime($sNow)); - date_default_timezone_set($currentTimeZone); - } else { - $runDate = gmdate('Y-m-d H:i:s'); - } - } - return $runDate; -} - function executeUpdateAppTitle() { try { diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index f9e4f8c64..d4ee8e48a 100644 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -301,10 +301,11 @@ if (!(array_key_exists('REMOTE_USER', $_SERVER) && (string)($_SERVER['REMOTE_USE ini_set('session.cookie_httponly', 1); ini_set('session.cookie_secure', 1); } -//$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL; -//$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all; -//$e_all = $config['debug'] ? $e_all : $e_all & ~ E_NOTICE; -//$e_all = E_ALL & ~ E_DEPRECATED & ~ E_STRICT & ~ E_NOTICE & ~E_WARNING; + +//Set Time Zone +/*----------------------------------********---------------------------------*/ +$_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int)($config['system_utc_time_zone']) == 1; +/*----------------------------------********---------------------------------*/ // Do not change any of these settings directly, use env.ini instead ini_set('display_errors', $config['display_errors']); @@ -313,7 +314,8 @@ ini_set('short_open_tag', 'On'); ini_set('default_charset', "UTF-8"); ini_set('memory_limit', $config['memory_limit']); ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']); -ini_set('date.timezone', $config['time_zone']); //Set Time Zone +ini_set('date.timezone', + (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) ? 'UTC' : $config['time_zone']); //Set Time Zone define('DEBUG_SQL_LOG', $config['debug_sql']); define('DEBUG_SQL', $config['debug']); @@ -321,9 +323,7 @@ define('DEBUG_TIME_LOG', $config['debug_time']); define('DEBUG_CALENDAR_LOG', $config['debug_calendar']); define('MEMCACHED_ENABLED', $config['memcached']); define('MEMCACHED_SERVER', $config['memcached_server']); - define('WS_IN_LOGIN', isset($config['WS_IN_LOGIN']) ? $config['WS_IN_LOGIN'] : 'serverconf'); - define('LOAD_HEADERS_IE', $config['load_headers_ie']); define('LEAVE_CASE_WARNING', $config['leave_case_warning']); define('REDIRECT_TO_MOBILE', $config['redirect_to_mobile']); @@ -332,6 +332,7 @@ define('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION', $config['disable_downloa define('LOGS_MAX_FILES', $config['logs_max_files']); define('LOGS_LOCATION', $config['logs_location']); define('LOGGING_LEVEL', $config['logging_level']); +define('TIME_ZONE', ini_get('date.timezone')); // IIS Compatibility, SERVER_ADDR doesn't exist on that env, so we need to define it. $_SERVER['SERVER_ADDR'] = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['SERVER_NAME']; @@ -565,7 +566,11 @@ ini_set('short_open_tag', 'On'); ini_set('default_charset', "UTF-8"); ini_set('memory_limit', $config['memory_limit']); ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']); -ini_set('date.timezone', $config['time_zone']); //Set Time Zone +ini_set('date.timezone', TIME_ZONE); //Set Time Zone + +date_default_timezone_set(TIME_ZONE); + +config(['app.timezone' => TIME_ZONE]); // Load Language Translation Bootstrap::LoadTranslationObject(defined('SYS_LANG') ? SYS_LANG : "en"); @@ -707,16 +712,6 @@ Bootstrap::LoadTranslationPlugins(defined('SYS_LANG') ? SYS_LANG : "en", $attrib // Initialization functions plugins $oPluginRegistry->init(); -//Set Time Zone -/*----------------------------------********---------------------------------*/ -$_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int)($config['system_utc_time_zone']) == 1; -/*----------------------------------********---------------------------------*/ - -ini_set('date.timezone', - (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) ? 'UTC' : $config['time_zone']); //Set Time Zone - -define('TIME_ZONE', ini_get('date.timezone')); - /*----------------------------------********---------------------------------*/ $_GET = \ProcessMaker\Util\DateTime::convertDataToUtc($_GET); $_POST = \ProcessMaker\Util\DateTime::convertDataToUtc($_POST);