Skip to content

Commit edacf90

Browse files
yeldarbyclaude
andcommitted
fix(cli): format epoch timestamps in project get output
Created/Updated fields now display as human-readable dates (YYYY-MM-DD HH:MM:SS) instead of raw epoch floats. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 406a19d commit edacf90

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

roboflow/cli/handlers/project.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,15 @@ def _get_project(args: argparse.Namespace) -> None:
125125
("Updated", "updated"),
126126
("Public", "public"),
127127
]
128+
epoch_keys = {"created", "updated"}
128129
for label, key in field_map:
129130
if key in project:
130131
val = project[key]
131-
if isinstance(val, dict):
132+
if key in epoch_keys and isinstance(val, (int, float)):
133+
import datetime
134+
135+
val = datetime.datetime.fromtimestamp(val).strftime("%Y-%m-%d %H:%M:%S")
136+
elif isinstance(val, dict):
132137
val = ", ".join(f"{k}: {v}" for k, v in val.items())
133138
lines.append(f" {label:12s} {val}")
134139
text = "\n".join(lines) if lines else "(no project details)"

0 commit comments

Comments
 (0)