We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d5f8a7 commit 93f9847Copy full SHA for 93f9847
opensensor/collection_apis.py
@@ -486,7 +486,12 @@ def sample_and_paginate_collection(
486
487
# Add UTC offset to timestamp field
488
for item in raw_data:
489
- item["timestamp"] = item["timestamp"].replace(tzinfo=timezone.utc).isoformat()
+ if isinstance(item["timestamp"], datetime):
490
+ item["timestamp"] = item["timestamp"].replace(tzinfo=timezone.utc).isoformat()
491
+ elif isinstance(item["timestamp"], str):
492
+ item["timestamp"] = (
493
+ datetime.fromisoformat(item["timestamp"]).replace(tzinfo=timezone.utc).isoformat()
494
+ )
495
496
if response_model is VPD:
497
# If the response model is VPD, you already have VPD-related data from the pipeline.
0 commit comments