Skip to content

Commit 23191bb

Browse files
Use strftime for more reliable ISO timestamp formatting
Co-authored-by: Lackadaisical-Security <205846242+Lackadaisical-Security@users.noreply.github.com>
1 parent 542a6b5 commit 23191bb

4 files changed

Lines changed: 40 additions & 14 deletions

File tree

REALTIME_STATS.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"timestamp": "2026-01-04T23:04:02.685777Z",
2+
"timestamp": "2026-01-04T23:06:02.761107Z",
33
"local": {
4-
"commit_count": 3,
4+
"commit_count": 4,
55
"unique_contributors": 2,
6-
"last_commit_date": "2026-01-04 23:03:16 +0000",
7-
"last_commit_message": "Fix auto-tracking issues and add real-time stats to README",
6+
"last_commit_date": "2026-01-04 23:04:23 +0000",
7+
"last_commit_message": "Remove stats files from .gitignore to enable auto-tracking workflow",
88
"current_branch": "copilot/fix-auto-tracking-issues",
9-
"tracked_files": 60,
10-
"timestamp": "2026-01-04T23:04:02.696510Z"
9+
"tracked_files": 63,
10+
"timestamp": "2026-01-04T23:06:02.771988Z"
1111
},
1212
"github": {}
1313
}

REALTIME_STATS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Repository Statistics - Real-Time
22

3-
**Last Updated:** 2026-01-04T23:04:02.685777Z
3+
**Last Updated:** 2026-01-04T23:06:02.761107Z
44

55
## 📊 Current Statistics
66

@@ -9,11 +9,11 @@
99
| Metric | Value |
1010
|--------|-------|
1111
| 🌿 Current Branch | `copilot/fix-auto-tracking-issues` |
12-
| 📝 Total Commits | 3 |
12+
| 📝 Total Commits | 4 |
1313
| 👥 Contributors | 2 |
14-
| 📄 Tracked Files | 60 |
15-
| 🕐 Last Commit | 2026-01-04 23:03:16 |
16-
| 💬 Last Message | Fix auto-tracking issues and add real-time stats to README |
14+
| 📄 Tracked Files | 63 |
15+
| 🕐 Last Commit | 2026-01-04 23:04:23 |
16+
| 💬 Last Message | Remove stats files from .gitignore to enable auto-tracking workflow |
1717

1818
---
1919

@@ -22,7 +22,7 @@
2222
Add these to your README.md:
2323

2424
```markdown
25-
<img src="https://img.shields.io/badge/commits-3-orange?style=flat-square">
25+
<img src="https://img.shields.io/badge/commits-4-orange?style=flat-square">
2626
```
2727

2828
---

STATS_HISTORY.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,31 @@
6363
"timestamp": "2026-01-04T23:04:02.696510Z"
6464
},
6565
"github": {}
66+
},
67+
{
68+
"timestamp": "2026-01-04T23:04:53.950927Z",
69+
"local": {
70+
"commit_count": 4,
71+
"unique_contributors": 2,
72+
"last_commit_date": "2026-01-04 23:04:23 +0000",
73+
"last_commit_message": "Remove stats files from .gitignore to enable auto-tracking workflow",
74+
"current_branch": "copilot/fix-auto-tracking-issues",
75+
"tracked_files": 63,
76+
"timestamp": "2026-01-04T23:04:53.961875Z"
77+
},
78+
"github": {}
79+
},
80+
{
81+
"timestamp": "2026-01-04T23:06:02.761107Z",
82+
"local": {
83+
"commit_count": 4,
84+
"unique_contributors": 2,
85+
"last_commit_date": "2026-01-04 23:04:23 +0000",
86+
"last_commit_message": "Remove stats files from .gitignore to enable auto-tracking workflow",
87+
"current_branch": "copilot/fix-auto-tracking-issues",
88+
"tracked_files": 63,
89+
"timestamp": "2026-01-04T23:06:02.771988Z"
90+
},
91+
"github": {}
6692
}
6793
]

realtime_stats_tracker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def get_local_git_stats(self):
100100
"last_commit_message": last_commit_msg,
101101
"current_branch": current_branch,
102102
"tracked_files": file_count,
103-
"timestamp": datetime.now(UTC).isoformat().replace('+00:00', 'Z')
103+
"timestamp": datetime.now(UTC).strftime('%Y-%m-%dT%H:%M:%S.%fZ')
104104
}
105105
except Exception as e:
106106
print(f"⚠️ Error getting local git stats: {e}")
@@ -152,7 +152,7 @@ def collect_stats(self):
152152
print("🔍 Collecting repository statistics...\n")
153153

154154
stats = {
155-
"timestamp": datetime.now(UTC).isoformat().replace('+00:00', 'Z'),
155+
"timestamp": datetime.now(UTC).strftime('%Y-%m-%dT%H:%M:%S.%fZ'),
156156
"local": self.get_local_git_stats(),
157157
"github": self.get_github_stats()
158158
}

0 commit comments

Comments
 (0)