File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 * UP rather than down.
3333 */
3434
35+ // ---------------------------------------------------------------------------
36+ // The day boundary
37+ // ---------------------------------------------------------------------------
38+
39+ /**
40+ * Every daily boundary in the ads system — spend caps, per-user engagement
41+ * ceilings, delivery reporting, the placements spend ledger's `day` column —
42+ * is a PACIFIC calendar day.
43+ *
44+ * Not UTC, and this is worth one line of explanation: every other daily budget
45+ * in the product already resets Pacific (session pools, spend ceilings,
46+ * `freebuff_daily_usage`), and an advertiser whose "day" ended at a different
47+ * hour than the user quota that feeds it would see delivery that appears to
48+ * arrive before it was funded.
49+ *
50+ * It lives in `common` rather than beside the console because the Stripe
51+ * webhook — in `web/`, which cannot import `freebuff/web` — has to compute the
52+ * same day the console does.
53+ */
54+ export const AD_RESET_TIMEZONE = 'America/Los_Angeles'
55+
3556// ---------------------------------------------------------------------------
3657// Pricing
3758// ---------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments