Skip to content

bugfix: use uniform datetime fmt with 8601 type on the wire #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions nominal/nominal.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

from ._api.ingest.ingest_api import (
AbsoluteTimestamp,
CustomTimestamp,
IngestService,
IngestSource,
RelativeTimestamp,
S3IngestSource,
TimestampMetadata,
Iso8601Timestamp,
TimestampType,
TriggerIngest,
)
Expand Down Expand Up @@ -130,7 +130,7 @@ def __upload_file(self, overwrite: bool) -> requests.Response:
self.filename = default_filename("DATASET")

csv_file_buffer = io.BytesIO()
self.write_csv(csv_file_buffer)
self.write_csv(csv_file_buffer, datetime_format=r"%Y-%m-%dT%H:%M:%S.%fZ")

# Get the size of the buffer in bytes
csv_file_buffer.seek(0, os.SEEK_END)
Expand Down Expand Up @@ -192,9 +192,7 @@ def upload(self, overwrite: bool = False):

nominal_ts_metadata = TimestampMetadata(
"_python_datetime",
TimestampType(
absolute=AbsoluteTimestamp(custom_format=CustomTimestamp("yyyy-MM-dd['T']HH:mm:ss.SSSSSS", 0))
),
TimestampType(absolute=AbsoluteTimestamp(iso8601=Iso8601Timestamp())),
)

if self.relative:
Expand Down