Skip to content

fix(types): Accept datetime with microsecond precision and timezone offsets#115

Merged
dcramer merged 5 commits intodcramer:mainfrom
unexge:push-oquxlrrlmpkr
Feb 17, 2026
Merged

fix(types): Accept datetime with microsecond precision and timezone offsets#115
dcramer merged 5 commits intodcramer:mainfrom
unexge:push-oquxlrrlmpkr

Conversation

@unexge
Copy link
Contributor

@unexge unexge commented Feb 5, 2026

I started getting errors like:

Error: DataCorruptionError: Data file ".dex/tasks.jsonl" is corrupted: Invalid schema on line 2: [
  {
    "code": "invalid_string",
    "validation": "datetime",
    "message": "Invalid datetime",
    "path": [
      "completed_at"
    ]
  }
]

in one of my projects, and completed_at was 2026-02-05T08:56:48.487608+00:00. Not sure if Dex created this datetime originally or if my agent skip Dex and edited JSONL directly (which is more likely) but I feel like it would be beneficial to make datetime parser more liberal.

…ffsets

Python and other tools that agents may use emit timestamps with higher
precision than JavaScript's native Date.toISOString(). Update the datetime
schema to accept variable fractional seconds and timezone offsets.
@vercel
Copy link

vercel bot commented Feb 5, 2026

@unexge is attempting to deploy a commit to the David Cramer's projects Team on Vercel.

A member of the Team first needs to authorize it.

dcramer and others added 2 commits February 17, 2026 13:05
@dcramer
Copy link
Owner

dcramer commented Feb 17, 2026

sorry im slow af here - i think i either lost these notifications in the 100s that come in from sentry, or i am just not getting them on this repo

dcramer and others added 2 commits February 17, 2026 13:15
Zod's datetime() already accepts variable fractional seconds by default;
the { offset: true } option only adds timezone offset support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dcramer dcramer merged commit 939f6cb into dcramer:main Feb 17, 2026
2 of 3 checks passed
@unexge unexge deleted the push-oquxlrrlmpkr branch February 18, 2026 09:49
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.

2 participants

Comments