Skip to content

Commit

Permalink
NGIN-10: MDYH was set on a 12 hour clock with no AM/PM instead of a 2…
Browse files Browse the repository at this point in the history
…4 hour clock as needed by the application.
  • Loading branch information
Christopher Gu committed Nov 7, 2014
1 parent 788151c commit cecb4a7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function incrementAdCampaignBannerImpressionsCounterAndSpend($buyer_id, $

$BuySideHourlyImpressionsCounterCurrentSpendFactory = \_factory\BuySideHourlyImpressionsCounterCurrentSpend::get_instance();

$current_hour = date("m/d/Y h");
$current_hour = date("m/d/Y H");

$params = array();
$params["BuySidePartnerID"] = $buyer_id;
Expand Down Expand Up @@ -234,7 +234,7 @@ public function incrementAdCampaignBannerBidsCounter($buyer_id, $banner_id, $bid

$BuySideHourlyBidsCounterFactory = \_factory\BuySideHourlyBidsCounter::get_instance();

$current_hour = date("m/d/Y h");
$current_hour = date("m/d/Y H");

$params = array();
$params["BuySidePartnerID"] = $buyer_id;
Expand Down Expand Up @@ -311,7 +311,7 @@ public function incrementBuySideHourlyImpressionsByTLD($banner_id, $tld, $bid_co

$BuySideHourlyImpressionsByTLDFactory = \_factory\BuySideHourlyImpressionsByTLD::get_instance();

$current_hour = date("m/d/Y h");
$current_hour = date("m/d/Y H");

$params = array();
$params["AdCampaignBannerID"] = $banner_id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,24 @@ public function getPerTimeHeader($is_admin = false){

public function re_normalize_time($str_time) {

$denormalized_time = "";

$timestamp_parts = explode(" ", $str_time);
if (count($timestamp_parts) == 2):
$denormalized_time = "";

$date_timestamp = $timestamp_parts[0];
$hour_timestamp = $timestamp_parts[1];
$timestamp_parts = explode(" ", $str_time);
if (count($timestamp_parts) == 2):

$date_timestamp = $timestamp_parts[0];
$hour_timestamp = $timestamp_parts[1];

$denormalized_time = strtotime($date_timestamp);

$timestamp_hours_as_seconds = intval($hour_timestamp) * 3600;
$denormalized_time += $timestamp_hours_as_seconds;

$denormalized_time = strtotime($date_timestamp);
$denormalized_time = date("m/d/Y h:i A", $denormalized_time);

$timestamp_hours_as_seconds = intval($hour_timestamp) * 3600;
$denormalized_time += $timestamp_hours_as_seconds;

$denormalized_time = date("m/d/Y h:i A", $denormalized_time);

endif;

return $denormalized_time;
endif;

return $denormalized_time;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function incrementContractPublisherZoneHourlyImpressions(\model\Co

$ContractPublisherZoneHourlyImpressionsFactory = \_factory\ContractPublisherZoneHourlyImpressions::get_instance();

$current_hour = date("m/d/Y h");
$current_hour = date("m/d/Y H");

$params = array();
$params["AdCampaignBannerID"] = $ContractPublisherZoneHourlyImpressionsToAdd->AdCampaignBannerID;
Expand Down Expand Up @@ -178,7 +178,7 @@ public static function incrementSellSideBidsCounter(\model\SellSidePartnerHourly

$SellSidePartnerHourlyBidsFactory = \_factory\SellSidePartnerHourlyBids::get_instance();

$current_hour = date("m/d/Y h");
$current_hour = date("m/d/Y H");

$params = array();
$params["SellSidePartnerID"] = $SellSidePartnerHourlyBidsToAdd->SellSidePartnerID;
Expand Down Expand Up @@ -261,7 +261,7 @@ public static function incrementPublisherBidsCounter(\model\PublisherHourlyBids

$PublisherHourlyBidsFactory = \_factory\PublisherHourlyBids::get_instance();

$current_hour = date("m/d/Y h");
$current_hour = date("m/d/Y H");

$params = array();
$params["PublisherHourlyBidsID"] = $PublisherHourlyBidsToAdd->PublisherHourlyBidsID;
Expand Down

0 comments on commit cecb4a7

Please sign in to comment.