Why is Ternary displaying a difference in daily cost from what the GCP console shows?

Learn why daily cost differences may appear between Ternary and the Google console due to timezone differences between exports and reports.

Ternary uses BigQuery billing export data as the source for cost reporting. Differences may appear when compared to the Google Cloud Billing console due to timezone handling.

The Google Cloud console displays cost data in Pacific Time (PDT), while BigQuery billing export data is recorded in UTC. This difference can result in costs being attributed to different calendar days across the two systems.

Validate timezone differences

To compare UTC and PDT timestamps, run the following query on the billing export dataset:

SELECT DATE(usage_start_time) AS dateUTC, TIME(usage_start_time) AS timeUTC, DATE(usage_start_time,"America/Los_Angeles") as datePDT, TIME(usage_start_time,"America/Los_Angeles") as timePDT, sum(cost) as cost
FROM `your_project_id.your_dataset_id.your_billing_export_table`
WHERE billing_account_id="YOUR BILLING ACCOUNT ID"
AND usage_start_time >= "2023-09-20" - Change date range to date of interest
AND usage_start_time < "2023-09-22" - Change date range to date of interest
AND sku.id="SINGLE SKU ID TO COMPARE"
GROUP BY dateUTC, timeUTC, datePDT, timePDT
ORDER BY datePDT, timePDT ASC
LIMIT 100

Compare the UTC and PDT timestamps to understand how costs are distributed across different days.

Additional note: Anomaly detection and alerting in Ternary are based on UTC timestamps, consistent with the underlying billing export data.