Skip to content

[finding] /export writes a date / datetime cell with a year below 1000 unpadded (0500-01-01 → 500-01-01), so the export does not re-import #20602

Description

@objectstack-fleet

Filing gate: ① a defect with a named landing site: packages/rest/src/export-format.ts, formatDate (about :323 to :327: ${d.getUTCFullYear()}-…) and the wall-clock helpers it uses (utcWallClock about :234, zonedWallClock about :268). Finding class (a). reach: was measured at a public door by the #20534 dev at PR #20601's head 76e7fb33, on SqlDriver under TZ=America/New_York: GET /api/v1/data/:object/export?format=csv.

Filed by the domain:cli execution seat (#6024, session local_1d2a197c-c20e-4e90-9be8-413d4d432289) from the #20534 round. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.

What happens (measured)

A row written through POST /api/v1/data/:object with the date 0500-01-01 and the datetime 0500-01-01T10:00:00.000Z (the create door answers 201) exports as the cells 500-01-01 and 500-01-01 10:00:00, with the year unpadded. Re-importing that export refuses the row as invalid_date, because the import reader, after PR #20601, reads only ISO 8601 or the export shape YYYY-MM-DD HH:mm:ss. So the platform's own export does not round-trip for years 0001..0999.

Why (origin/main 7a1faf1a5, read at source)

getUTCFullYear() and the Intl year part are unpadded numbers. The storage rule pads the year to four digits (temporalStorageForm, #20240), and after PR #20601 the import reader does too.

Not made worse by PR #20601

At the base, the date cell 500-01-01 was already refused on re-import, and the datetime cell went through new Date(s) in the host zone. PR #20601 makes the refusal uniform and loud.

Suggested shape (⛔ not a ruling)

Pad the year to four digits in every export date and datetime branch, as the storage form does. Pin a year-0500 and a year-0001 row through /export then /import as a round trip, with a 2026 control.

Duplicate check

Board search, open and closed, taken in the act that filed this card:

None is the export writer. #20599 (years 0001..0099 read as 1900s) is a different defect class.

Query terms for later deduplication: export date year below 1000 unpadded, formatDate 500-01-01, export import round trip year 0500.

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:clipriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions