Skip to content

Commit

Permalink
🎨 Remove sysdate for more conventional convert_timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
jurrigerretsen committed Feb 22, 2024
1 parent 6d56aaa commit 002960c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/analysis/revenuecat_monthly_recurring_revenue.sql
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ final as (
transaction_monthly_revenue
on transaction_monthly_revenue.start_time::date <= last_day(date_month, month)
and case
when transaction_monthly_revenue.effective_end_time >= convert_timezone('America/Los_Angeles', 'UTC', SYSDATE()::date) -- Assumes that RevenueCat runs their data model at this time. This gives an 99.9% accurate MRR number for the current month & prior months
when transaction_monthly_revenue.effective_end_time >= convert_timezone('America/Los_Angeles', 'UTC', convert_timezone('UTC', current_timestamp)::date) -- Assumes that RevenueCat runs their data model at this time. This gives an 99.9% accurate MRR number for the current month & prior months
then transaction_monthly_revenue.effective_end_time::date > date_spine.date_month
else transaction_monthly_revenue.effective_end_time::date > last_day(date_spine.date_month, month)
end
Expand Down

0 comments on commit 002960c

Please sign in to comment.