← back to Calendar Agentabrams
calendar: pin Pacific TZ (match Mac2 poster) + bundle ledger snapshots for accurate prod projection
c5018c06ad67e8e455cb7458713709fef9b3c27a · 2026-08-06 16:35:23 -0700 · Steve Abrams
Files touched
M schedule.mjsM server.js
Diff
commit c5018c06ad67e8e455cb7458713709fef9b3c27a
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Aug 6 16:35:23 2026 -0700
calendar: pin Pacific TZ (match Mac2 poster) + bundle ledger snapshots for accurate prod projection
---
schedule.mjs | 5 ++++-
server.js | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/schedule.mjs b/schedule.mjs
index 334cc2d..4c5cfc3 100644
--- a/schedule.mjs
+++ b/schedule.mjs
@@ -23,7 +23,10 @@ function films(kind) {
}
function ledgerSeed(kind) {
const name = kind === 'store' ? 'ledger-store.jsonl' : 'ledger.jsonl';
- const rows = readLedger(path.join(POSTER, 'social/poster', name));
+ // Prefer the live poster ledger (Mac2); fall back to a bundled snapshot synced from
+ // Mac2 after each post (so a Kamatera-deployed calendar stays current, not clean-slate).
+ let rows = readLedger(path.join(POSTER, 'social/poster', name));
+ if (!rows.length) rows = readLedger(path.join(HERE, 'data', name));
const last = new Map();
for (const e of rows) if (e.slug && !e.dryRun) last.set(e.slug, e.ts); // mirror poster: real posts only
return last;
diff --git a/server.js b/server.js
index 4e77e96..a8a4850 100644
--- a/server.js
+++ b/server.js
@@ -1,4 +1,7 @@
// calendar.agentabrams.com — BHV Instagram posting calendar.
+// Pin to Pacific so slot times match the Mac2 launchd poster regardless of server TZ
+// (Kamatera runs UTC). Must be set before any Date use.
+process.env.TZ = 'America/Los_Angeles';
import express from 'express';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
← a5efb54 auto-data-snapshot: 2026-08-06T16:33:58 (2 data files) — dat
·
back to Calendar Agentabrams
·
auto-data-snapshot: 2026-09-01T12:55:30 (2 data files) — nod f401aee →