From 499a109fd8f2fc7c78960c2977e1dc17a1e6a2af Mon Sep 17 00:00:00 2001 From: ziadarafat Date: Sat, 28 Nov 2026 21:11:49 -0700 Subject: [PATCH] handoff: timezone-aware timestamp in queue entries datetime.utcnow() is deprecated and printed a DeprecationWarning on every submit; the queuedAt field is unchanged in format. --- bin/handoff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/handoff b/bin/handoff index 495c6fe..987d3c0 100755 --- a/bin/handoff +++ b/bin/handoff @@ -65,7 +65,7 @@ cmd_submit() { python3 - "$QUEUE/$id.json" "$id" "$dir" "$role" "$bpath" <<'PY' import json, sys, datetime path, rid, d, role, brief = sys.argv[1:6] -json.dump({"id": rid, "dir": d, "role": role, "brief": brief, "queuedAt": datetime.datetime.utcnow().isoformat()+"Z"}, open(path, "w"), indent=1) +json.dump({"id": rid, "dir": d, "role": role, "brief": brief, "queuedAt": datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None).isoformat()+"Z"}, open(path, "w"), indent=1) PY printf 'queued %s\n dir: %s\n role: %s\n log: %s/%s/run.log\n' "$id" "$dir" "$role" "$STATE" "$id" echo " start the daemon if it is not running: handoff daemon &"