CC-5627 : Check all Application_Common_DateHelper calculations that use

timezone.

* Changed getRangeStartAndEnd() to use UTC explictly
This commit is contained in:
Albert Santoni 2013-12-12 11:32:40 -05:00
parent abf3a50694
commit 8986f1bc4f
1 changed files with 4 additions and 2 deletions

View File

@ -858,16 +858,18 @@ SQL;
{
$CC_CONFIG = Config::getConfig();
$scheduleTimeZone = new DateTimeZone('UTC');
/* if $p_fromDateTime and $p_toDateTime function parameters are null,
then set range * from "now" to "now + 24 hours". */
if (is_null($p_fromDateTime)) {
$t1 = new DateTime("@".time());
$t1 = new DateTime("@".time(), $scheduleTimeZone);
$range_start = $t1->format("Y-m-d H:i:s");
} else {
$range_start = Application_Model_Schedule::PypoTimeToAirtimeTime($p_fromDateTime);
}
if (is_null($p_fromDateTime)) {
$t2 = new DateTime("@".time());
$t2 = new DateTime("@".time(), $scheduleTimeZone);
$cache_ahead_hours = $CC_CONFIG["cache_ahead_hours"];