Skip to content

Conversation

@Sagarpillai
Copy link

Implements #655.

Adds a configurable history window for start_datetime_utc in generation + forecast queries.

Two env vars control this:
• NEXT_PUBLIC_HISTORY_START_TYPE = “rolling” or “fixed”
• NEXT_PUBLIC_HISTORY_START_OFFSET_HOURS = numeric hour offset (default 48)

“rolling” = now - offset hours (existing behaviour)
“fixed” = midnight UTC N days ago

getHistoryStartISO() now reads these envs, and both queries use it.

This allows Vercel preview / production to tune the history window without code changes.

Local build + typecheck pass. Defaults keep current behaviour.

@vercel
Copy link

vercel bot commented Nov 4, 2025

@Sagarpillai is attempting to deploy a commit to the Open Climate Fix Team on Vercel.

A member of the Team first needs to authorize it.

@Sagarpillai Sagarpillai marked this pull request as ready for review November 4, 2025 13:35
@Sagarpillai
Copy link
Author

Sagarpillai commented Nov 8, 2025

Hey, @braddf
Would love a review of this whenever you get a chance. Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant