Use Denver local time for scrape dates instead of UTC
Change default SCRAPER_TIMEZONE from UTC to America/Denver so that scrape date records (date_checked, daily summaries) reflect local time. A late-night manual scrape and early-morning automated scrape will no longer both report as the same UTC day. Updated getTodayUTC/getTodayDateUTC helpers to use toLocaleDateString with the configured timezone. ISO timestamps for last_scraped, first_seen, startedAt etc. remain in UTC as they represent precise moments.
This commit is contained in:
@ -13,7 +13,7 @@ module.exports = {
|
||||
|
||||
// Scheduling configuration
|
||||
SCRAPER_SCHEDULE: process.env.SCRAPER_SCHEDULE || '0 6 * * *',
|
||||
SCRAPER_TIMEZONE: process.env.SCRAPER_TIMEZONE || 'UTC',
|
||||
SCRAPER_TIMEZONE: process.env.SCRAPER_TIMEZONE || 'America/Denver',
|
||||
SCRAPER_ENABLED: process.env.SCRAPER_ENABLED !== 'false',
|
||||
|
||||
// HTTP settings
|
||||
|
||||
Reference in New Issue
Block a user