From 12895e2e584c63cfd30ae5df78c2aa9373f74f44 Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Wed, 30 Mar 2016 13:04:55 -0400 Subject: [PATCH] HOR-579 "Process Elements > Start timer event no funciona" --- workflow/engine/bin/cron_single.php | 14 ++++++++++++++ .../src/ProcessMaker/BusinessModel/TimerEvent.php | 12 ++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/workflow/engine/bin/cron_single.php b/workflow/engine/bin/cron_single.php index d261d6b4e..7e412a06e 100755 --- a/workflow/engine/bin/cron_single.php +++ b/workflow/engine/bin/cron_single.php @@ -265,6 +265,20 @@ try { define('DB_ADAPTER', $DB_ADAPTER); } + //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')); + + //Processing eprintln('Processing workspace: ' . $workspace, 'green'); try { diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php b/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php index de2c8f6ce..76f60e4f7 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php @@ -1182,7 +1182,7 @@ class TimerEvent //Start Timer-Event (start new case) /////////////////////////////////////////////////////////////////////// $common->frontEndShow("START"); - $this->log("START-NEW-CASES", "Date \"$datetime\": Start new cases"); + $this->log("START-NEW-CASES", "Date \"$datetime (UTC +00:00)\": Start new cases"); //Query $criteria = $this->getTimerEventCriteria(); @@ -1349,17 +1349,17 @@ class TimerEvent } if (!$flagRecord) { - $common->frontEndShow("TEXT", "Not exists any record to start a new case, on date \"$datetime\""); + $common->frontEndShow("TEXT", "Not exists any record to start a new case, on date \"$datetime (UTC +00:00)\""); $this->log("NO-RECORDS", "Not exists any record to start a new case"); } $common->frontEndShow("END"); - $this->log("END-NEW-CASES", "Date \"$datetime\": End new cases"); + $this->log("END-NEW-CASES", "Date \"$datetime (UTC +00:00)\": End new cases"); //Intermediate Catch Timer-Event (continue the case) /////////////////////////////////////////////////////// - $this->log("START-CONTINUE-CASES", "Date \"$datetime\": Start continue the cases"); + $this->log("START-CONTINUE-CASES", "Date \"$datetime (UTC +00:00)\": Start continue the cases"); //Query $criteriaMain = $this->getTimerEventCriteria(); @@ -1555,14 +1555,14 @@ class TimerEvent } while ($flagNextRecord); if (!$flagRecord) { - $common->frontEndShow("TEXT", "Not exists any record to continue a case, on date \"$datetime\""); + $common->frontEndShow("TEXT", "Not exists any record to continue a case, on date \"$datetime (UTC +00:00)\""); $this->log("NO-RECORDS", "Not exists any record to continue a case"); } $common->frontEndShow("END"); - $this->log("END-CONTINUE-CASES", "Date \"$datetime\": End continue the cases"); + $this->log("END-CONTINUE-CASES", "Date \"$datetime (UTC +00:00)\": End continue the cases"); } catch (\Exception $e) { throw $e; }