diff --git a/pyroengine/engine.py b/pyroengine/engine.py index f3eedc4a..2ac62b27 100644 --- a/pyroengine/engine.py +++ b/pyroengine/engine.py @@ -291,10 +291,10 @@ def predict(self, frame: Image.Image, cam_id: Optional[str] = None) -> float: output_predictions = preds conf = 0 - ts = datetime.now(timezone.utc).isoformat() + ts = datetime.now(timezone.utc) # Alert if conf > self.conf_thresh and len(self.api_client) > 0 and isinstance(cam_id, str): - self._stage_alert(frame, cam_id, ts, output_predictions.tolist()) + self._stage_alert(frame, cam_id, ts.isoformat(), output_predictions.tolist()) if self.save_captured_frames: self._local_backup(frame, cam_id, is_alert=False)