Skip to content

Fix conversion of datetimes in TransferData#1372

Merged
sirosen merged 1 commit intoglobus:mainfrom
sirosen:bugfix-datetime-conversions
Feb 27, 2026
Merged

Fix conversion of datetimes in TransferData#1372
sirosen merged 1 commit intoglobus:mainfrom
sirosen:bugfix-datetime-conversions

Conversation

@sirosen
Copy link
Member

@sirosen sirosen commented Feb 27, 2026

The deadline field accepts a datetime but does not stringify it.
On DeleteData, the same field exists, with the same semantics, and is
passed to our internal stringify() helper. Apply the same here as the
fix so that the two remain consistent.
A new unit test verifies the results.

Note that this calls str(deadline), which does not produce an
ISO 8601 date string. This was the behavior in the 3.x versions of the
SDK as well, which is part of why it is being kept rather than fixed at
this time.

Fixing it will require evaluating what the Transfer APIs accept.

Fixes #1371

The `deadline` field accepts a datetime but does not stringify it.
On `DeleteData`, the same field exists, with the same semantics, and is
passed to our internal `stringify()` helper. Apply the same here as the
fix so that the two remain consistent.
A new unit test verifies the results.

Note that this calls `str(deadline)`, which *does not* produce an
ISO 8601 date string. This was the behavior in the 3.x versions of the
SDK as well, which is part of why it is being kept rather than fixed at
this time.

Fixing it will require evaluating what the Transfer APIs accept.

Fixes globus#1371
@sirosen sirosen force-pushed the bugfix-datetime-conversions branch from 1b3016e to cef0d21 Compare February 27, 2026 16:07
@sirosen sirosen merged commit 46a5c4e into globus:main Feb 27, 2026
7 checks passed
@sirosen sirosen deleted the bugfix-datetime-conversions branch February 27, 2026 16:31
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.

Error serializing datetime objects

2 participants