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
Describe the bug
The created and last_modified fields use datetime which doesn't require a timezone and somewhere between creation and upload to DocDB the last_modified field is losing it's timezone.
Also the comment in metadata.py about creation/last_modified matching seems to be outdated:
# We'll set created and last_modified defaults using the root_validator
# to ensure they're synced on creation
created: datetime = Field(
default_factory=datetime.utcnow,
title="Created",
description="The utc date and time the data asset created.",
)
last_modified: datetime = Field(
default_factory=datetime.utcnow,
title="Last Modified",
description="The utc date and time that the data asset was last modified.",
)
Expected behavior
Both fields could be changed to AwareDatetimeWithDefault to enforce timezone usage and their initial value should be set at the same time (or not if that doesn't actually matter)
Describe the bug
The created and last_modified fields use
datetime
which doesn't require a timezone and somewhere between creation and upload to DocDB the last_modified field is losing it's timezone.Also the comment in
metadata.py
about creation/last_modified matching seems to be outdated:Expected behavior
Both fields could be changed to AwareDatetimeWithDefault to enforce timezone usage and their initial value should be set at the same time (or not if that doesn't actually matter)
Blocking #1086
The text was updated successfully, but these errors were encountered: