fix(bhyve): EU display dates (DD.mmm.YYYY) per AGENTS date rule (Sam & Claude)

User-facing timestamps in run-bhyve-test.sh used the ambiguous numeric form
%Y-%m-%d. Switch to European display (date +%d.%b.%Y %H:%M:%S). Log filename
keeps sortable ISO 8601 basic (machine artifact, per the rule's internal-storage
exemption).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Sam & Claude 2026-06-05 12:05:32 +02:00
parent 58443b0f8c
commit 667ebdc210

View file

@ -14,15 +14,18 @@
LOG_DIR="${PWD}/logs"
mkdir -p "$LOG_DIR"
# Log filename uses sortable ISO 8601 basic (machine artifact name, per the
# AGENTS.md date rule's internal-storage exemption). User-facing timestamps
# below use European display format (DD.mmm.YYYY HH:MM:SS).
LOG_FILE="${LOG_DIR}/bhyve-test-$(date +%Y%m%d-%H%M%S).log"
echo "Test started: $(date)" > "$LOG_FILE"
echo "Test started: $(date '+%d.%b.%Y %H:%M:%S')" > "$LOG_FILE"
echo "Log: $LOG_FILE" >&2
echo "" >> "$LOG_FILE"
# Run the actual test script, capturing both stdout and stderr
echo "=== BHYVE TEST START ===" >> "$LOG_FILE"
echo "Command: $(pwd)/scripts/bhyve-test.sh $*" >> "$LOG_FILE"
echo "Started: $(date '+%Y-%m-%d %H:%M:%S')" >> "$LOG_FILE"
echo "Started: $(date '+%d.%b.%Y %H:%M:%S')" >> "$LOG_FILE"
echo "" >> "$LOG_FILE"
# Run with tee to show output AND log it. Pass through any args (ISO path, --name).
@ -31,7 +34,7 @@ EXIT_CODE=$?
echo "" >> "$LOG_FILE"
echo "=== BHYVE TEST END ===" >> "$LOG_FILE"
echo "Ended: $(date '+%Y-%m-%d %H:%M:%S')" >> "$LOG_FILE"
echo "Ended: $(date '+%d.%b.%Y %H:%M:%S')" >> "$LOG_FILE"
echo "Exit code: $EXIT_CODE" >> "$LOG_FILE"
echo "" >> "$LOG_FILE"