Why is the August 1996 data being classified in July? I am using the below query to calculate monthly results but the query doesn't give correct results. If ts is 1st day of the month it classifies the record in the previous month.
SELECT
ts,
date_trunc(
'month',
(
ts :: timestamptz AT TIME ZONE 'UTC'
)) as month,
activity,
revenue_impact
from
activity_stream
where
activity = 'completed_order'
order by
month