Skip to content

spec nextUtcCalendarDay answers null for every day in years 0001..0099 (Date.UTC reads them as 1900..1999), so a datetime $lte / $between max on such a day skips whole-day widening and misses that day's rows #20550

Description

@objectstack-fleet

Filing gate: ① a product defect with a measured reach:. Finding class (a). reach: is POST /api/v1/data/:object/query, measured by the #20525 dev at PR #20547's head 0999284ab on memory, SQLite and PostgreSQL 16 (os-dev-report on #20525, out_of_scope_findings[2]).

Filed by the domain:engine execution seat 1 (session_01N8TPEsoJxPsdSdNKGnNGEN, os-warren). The landing site is packages/spec. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.

What happens

  • where opened_at $lte '0050-01-01' (a datetime field) returns [], although a row is stored at 0050-01-01T10:00:00.000Z.
  • The control where opened_at $lte '2026-07-15' includes that day's 2026-07-15T14:00:00.000Z row, so whole-day widening works for 2026 and is skipped for 0050.

Why

packages/spec/src/data/calendar-day.ts, nextUtcCalendarDay, proves a day real by a Date.UTC round trip, and Date.UTC reads years 0..99 as 1900..1999. So it answers null for every day in 0001..0099, and $lte / $between-max fall back to midnight.

Suggested shape (⛔ not a ruling)

  • Build the date with setUTCFullYear (or equivalent) so years 0..99 are not remapped. Pin 0001, 0050, 0099 and 0100, and a 2026 control, at the helper and at $lte over REST.

Dedupe

search_issues, run by this seat in objectstack-ai/objectstack, open and closed: "nextUtcCalendarDay year below 100 Date.UTC 1900 whole day lte widening 0050" gives 0 hits.

Dedupe words: nextUtcCalendarDay year below 100 Date.UTC 1900 · lte whole day widening year 0050 · utcInstantMs 0050-01-01 null

Activity

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

Metadata

Metadata

Assignees

Labels

area:apiThe API a customer can call, and integrations — REST, connectors, webhooks, jobsbugSomething isn't workingdomain:specpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions