fix: require actual system time for audit timestamps#56
fix: require actual system time for audit timestamps#56raj-jain-aws merged 4 commits intoawslabs:mainfrom
Conversation
| - **CRITICAL**: Using file writing tools and commands that overwrite contents of the entire audit.md and cause duplication | ||
| - Use ISO 8601 format for timestamps (YYYY-MM-DDTHH:MM:SSZ) | ||
| - Use ISO 8601 format with local timezone offset (e.g., `2026-01-29T13:45:22-0800`) | ||
| - **CRITICAL**: Execute a system command to get actual local time - NEVER fabricate or estimate timestamps |
There was a problem hiding this comment.
We've excessive CRITICAL rules in the workflow at the moment. We believe this is causing the models to not pay attention or honor them. Can we avoid the CRITICAL keyword here and still get the intended outcome?
There was a problem hiding this comment.
Agreed on avoiding CRITICAL.
I tested different approaches - Claude worked fine without it, but Cursor often missed timestamps entirely or used wrong times. The fix was making the instruction more explicit and step-by-step:
- When adding an entry to audit.md:
- Run
date +"%Y-%m-%dT%H:%M:%S%z"to get the current timestamp - Use the output exactly as the Timestamp value
Do not use placeholder (e.g., T00:00:00Z), estimated, or fabricated times.
- Run
Tested with both Claude and Cursor - both now run the command and use actual output. Updated the PR.
AI tools often fabricate timestamps (e.g., 00:00, 00:01 patterns) or capture incorrect time. This adds explicit instruction to run date command and use the output exactly.
117e6ff to
acef37e
Compare
raj-jain-aws
left a comment
There was a problem hiding this comment.
Pls. see comment about Windows CMD
|
Findings for PR 56 that fixes the timestamp issue in audit I have verified that it is working in Linux and Windows for:
Impact: Some clients ask permission to use system time functions ( |
|
The doc command to get the timestamp is: |
Done. Added @harmjeff 's command ^ |
|
Testing |
|
I tested your proposed commands directly on Window CMD, PowerShell and Mac zsh/bash outside of AI-DLC. The output is formatted differently for Windows CMD: Windows CMD Windows PowerShell MacOS zsh and bash Also, to conclude this PR, can you post test results for Q/Kiro in Windows and Mac (Linux) just so nothing is broken? The system prompting for permissions to run |
|
So I've been reviewing. Having 3 different instruction sets based on platform is very inefficient. Would a python solution be acceptable? `- When adding an entry to audit.md:
|
How would you like the test results to be posted? |
That assumes python is installed on the machine and also that |
Some screenshots will do. Just ensuring that nothing breaks in Q/Kiro on Windows/Mac. Where are we seeing the system prompting for permissions to run |
|
I understand the need. Are we saying we want 3 command types across 7 platforms? To get it reliable across platforms I had to create this ugly specification: We may be better off allowing the system to determine the best type of call to make based on platform and its own capabilities. Whith this the LLM has latitude to solve an easy problem |
Yes, I think this LLM latitude language is a better idea |
|
For the record I test:
I test on Windows and EC2 Amazon Linux 2023. I do not have access to a Mac, the assumption is that mac and Linux are synonymous Native platforms I have not been able to get running yet (not enough hours in the day):
Not sure what we need to do for 3rd party web platforms (ignoring for now, future work needed) |
If we go with natural language and not prescribe the |
|
@raj-jain-aws ready for your approval |
|
@raj-jain-aws Thanks for sharing this, what do we know about the user's environment? I assume Windows? If so, did they have powershell permission? Curious if they don't have Python installed. |
|
Looks like ruby worked, did AIDLC use ruby afterward? |













AI tools often fabricate timestamps (e.g., 00:00, 00:01 patterns) or capture incorrect time. This adds explicit instruction to execute a system command and use local timezone with offset for human readability.
Issue #, if available: #55
Description of changes:
Summary
AI tools fabricate timestamps in audit.md instead of capturing actual time. This adds explicit instruction to execute a system command for real timestamps.
Problem Observed
00:00:00,00:01:00,00:02:00...Change
Testing
date +"%Y-%m-%dT%H:%M:%S%z"and captured actual local time2026-01-29T14:19:02-0800By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.