Skip to content

Commit 9366e9f

Browse files
committed
store isoformat timestamps
1 parent dc0af97 commit 9366e9f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

codeflash/tracer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from __future__ import annotations
1313

1414
import contextlib
15+
import datetime
1516
import importlib.machinery
1617
import io
1718
import json
@@ -190,7 +191,10 @@ def __enter__(self) -> None:
190191
"INSERT INTO metadata VALUES (?, ?)",
191192
("functions_filter", json.dumps(self.functions) if self.functions else None),
192193
)
193-
cur.execute("INSERT INTO metadata VALUES (?, ?)", ("timestamp", str(int(time.time()))))
194+
cur.execute(
195+
"INSERT INTO metadata VALUES (?, ?)",
196+
("timestamp", datetime.datetime.now(datetime.timezone.utc).isoformat()),
197+
)
194198
cur.execute("INSERT INTO metadata VALUES (?, ?)", ("project_root", str(self.project_root)))
195199
console.rule("Codeflash: Traced Program Output Begin", style="bold blue")
196200
frame = sys._getframe(0) # Get this frame and simulate a call to it # noqa: SLF001

0 commit comments

Comments
 (0)