Skip to content

fix(datetime): use date-specific offsets for naive call filters - #30

Draft
Kayvan-Zahiri wants to merge 1 commit into
VapiAI:mainfrom
Kayvan-Zahiri:codex/use-date-specific-local-offset
Draft

Kayvan-Zahiri wants to merge 1 commit into
VapiAI:mainfrom
Kayvan-Zahiri:codex/use-date-specific-local-offset

Conversation

@Kayvan-Zahiri

Copy link
Copy Markdown

Naive datetimes in call-history filters receive today's local UTC offset, shifting historical/future filter boundaries across DST seasons. In Los Angeles during PDT, January noon is sent with -07:00 rather than -08:00.

Use the input datetime's astimezone() conversion to apply local rules for its own date, including ambiguous fall-back folds. Explicitly aware datetimes retain existing behavior.

Fixes #29. This is a tested proof of concept under the README contribution policy: the change belongs in the Fern-generated runtime and needs porting into generation before durable merge.

Validation:

  • 56 new public sync/async calls.list HTTPX MockTransport cases cover four created/updated filters, winter/summer, both DST folds, explicit UTC/positive-offset datetimes, and microseconds. Before: 24 failed, 32 passed. After: all 56 pass.
  • Full repository suite: 135 passed, 4 skipped, 326 existing Pydantic deprecation warnings.
  • Changed-file Ruff lint/format, targeted mypy, and git diff --check pass. Repository-wide Ruff reports three pre-existing import-order errors in unchanged custom test files.
  • Tests restore TZ after every case and skip runtime timezone switching on platforms without time.tzset. No live voice calls, credentials, or paid Vapi resources used.

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.

Naive datetime call filters use today’s UTC offset across DST seasons

1 participant