You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistency in DatasetVersionInfo model? (Date vs string) #476
* The timestamp of the last update to this dataset version.
* Format: ISO 8601 string (e.g., "2023-06-01T12:34:56Z").
* Used for optimistic concurrency control to detect concurrent updates.
*/
lastUpdateTime: string
releaseTime?: Date
releaseTime and createTime are represented as Date objects, while lastUpdateTime is represented as an ISO 8601 string and not transformed into a Date object:
To add to this, I think there is a bug with the releaseTime, it's being transformed to an "Invalid Date" object instead of undefined when versionPayload.releaseTime was undefined.
I just verified that it is intentionally kept as a string. This was explicitly changed in commit 14d7990b (“fix: change lastUpdateTime type to string…”).
This is passed unchanged as sourceLastUpdateTime for optimistic-concurrency checks when updating dataset metadata. Converting it to Date could alter its serialized actions. A Date has millisecond precision and normalizes serialization, so it may lose fractional precision or alter the original ISO representation.
Feel free to fix the bug from ReleaseTime if you want. Thanks!
Would it make sense to return createTime and releaseTime as strings too, for consistency?
Feel free to fix the bug from ReleaseTime if you want. Thanks!
OK, I'll try to open a PR with a fix when I have the time.
I’d keep the current types and clarify the comment if needed. createTime and releaseTime are ordinary timestamps consumers may sort, compare, or format, so Date is the useful domain type.
Activity
vera commentedon Aug 14, 2026
To add to this, I think there is a bug with the
releaseTime, it's being transformed to an "Invalid Date" object instead of undefined whenversionPayload.releaseTimewas undefined.ChengShi-1 commentedon Aug 20, 2026
I just verified that it is intentionally kept as a string. This was explicitly changed in commit 14d7990b (“fix: change lastUpdateTime type to string…”).
This is passed unchanged as
sourceLastUpdateTimefor optimistic-concurrency checks when updating dataset metadata. Converting it toDatecould alter its serialized actions. ADatehas millisecond precision and normalizes serialization, so it may lose fractional precision or alter the original ISO representation.Feel free to fix the bug from ReleaseTime if you want. Thanks!
vera commentedon Aug 24, 2026
Would it make sense to return
createTimeandreleaseTimeas strings too, for consistency?OK, I'll try to open a PR with a fix when I have the time.
ChengShi-1 commentedon Aug 24, 2026
I’d keep the current types and clarify the comment if needed.
createTimeandreleaseTimeare ordinary timestamps consumers may sort, compare, or format, soDateis the useful domain type.