|
9 | 9 | from pydantic import BaseModel, conlist, constr |
10 | 10 |
|
11 | 11 | from labelbox.schema.ontology import SchemaId |
12 | | -from labelbox.utils import _CamelCaseMixin, format_iso_datetime, format_iso_default_utc |
| 12 | +from labelbox.utils import _CamelCaseMixin, format_iso_datetime, format_iso_from_string |
13 | 13 |
|
14 | 14 |
|
15 | 15 | class DataRowMetadataKind(Enum): |
@@ -467,7 +467,7 @@ def parse_metadata_fields( |
467 | 467 | value=schema.uid) |
468 | 468 | elif schema.kind == DataRowMetadataKind.datetime: |
469 | 469 | field = DataRowMetadataField(schema_id=schema.uid, |
470 | | - value=format_iso_default_utc( |
| 470 | + value=format_iso_from_string( |
471 | 471 | f["value"])) |
472 | 472 | else: |
473 | 473 | field = DataRowMetadataField(schema_id=schema.uid, |
@@ -839,7 +839,7 @@ def _validate_parse_number( |
839 | 839 | def _validate_parse_datetime( |
840 | 840 | field: DataRowMetadataField) -> List[Dict[str, Union[SchemaId, str]]]: |
841 | 841 | if isinstance(field.value, str): |
842 | | - field.value = format_iso_default_utc(field.value) |
| 842 | + field.value = format_iso_from_string(field.value) |
843 | 843 | elif not isinstance(field.value, datetime): |
844 | 844 | raise TypeError( |
845 | 845 | f"Value for datetime fields must be either a string or datetime object. Found {type(field.value)}" |
|
0 commit comments