From bfb67420a0237e3f86992c8a9ee80dd197686638 Mon Sep 17 00:00:00 2001 From: Alexandre Rosenfeld Date: Wed, 1 Jun 2011 10:50:04 -0400 Subject: [PATCH] BUG 6735 Support time_zone setting in env.ini --- workflow/engine/config/paths.php | 5 +---- workflow/engine/methods/login/dbInfo.php | 1 + workflow/engine/xmlform/login/dbInfo.xml | 6 ++++-- workflow/public_html/sysGeneric.php | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/workflow/engine/config/paths.php b/workflow/engine/config/paths.php index 21e978480..c9c19c45b 100644 --- a/workflow/engine/config/paths.php +++ b/workflow/engine/config/paths.php @@ -117,10 +117,7 @@ define ( 'PO_SYSTEM_VERSION', 'PM 4.0.1'); ///************TimeZone Set***************// - if(!defined('TIME_ZONE')) { - define('TIME_ZONE', 'America/La_Paz'); - } - if (function_exists('date_default_timezone_set')) { + if (defined('TIME_ZONE') && function_exists('date_default_timezone_set')) { date_default_timezone_set(TIME_ZONE); } diff --git a/workflow/engine/methods/login/dbInfo.php b/workflow/engine/methods/login/dbInfo.php index 7dc831964..7b4f288cf 100644 --- a/workflow/engine/methods/login/dbInfo.php +++ b/workflow/engine/methods/login/dbInfo.php @@ -111,6 +111,7 @@ $Fields ['SERVER_PORT'] = getenv ( 'SERVER_PORT' ); $Fields ['REMOTE_HOST'] = getenv ( 'REMOTE_HOST' ); $Fields ['SERVER_ADDR'] = getenv ( 'SERVER_ADDR' ); $Fields ['HTTP_USER_AGENT'] = getenv ( 'HTTP_USER_AGENT' ); +$Fields ['TIME_ZONE'] = (defined('TIME_ZONE')) ? TIME_ZONE : "Unknown"; if (! defined ( 'SKIP_RENDER_SYSTEM_INFORMATION' )) { $G_PUBLISH = new Publisher ( ); diff --git a/workflow/engine/xmlform/login/dbInfo.xml b/workflow/engine/xmlform/login/dbInfo.xml index 981fb4748..fa6545d6f 100644 --- a/workflow/engine/xmlform/login/dbInfo.xml +++ b/workflow/engine/xmlform/login/dbInfo.xml @@ -9,7 +9,9 @@ Operating System Sistema operativo - + + Time zone + Web Server Servidor Web @@ -40,4 +42,4 @@ IP del usuario - \ No newline at end of file + diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index 47bbba945..5fb0dafd0 100644 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -40,6 +40,8 @@ $startingTime = array_sum(explode(' ',microtime())); define ('DEBUG_SQL_LOG', $config['debug_sql'] ); define ('DEBUG_TIME_LOG', $config['debug_time'] ); define ('DEBUG_CALENDAR_LOG', $config['debug_calendar'] ); + + define ('TIME_ZONE', $config['time_zone']); //*** process the $_POST with magic_quotes enabled function strip_slashes(&$vVar) {