Refactor timestamp handling in skill_validator.py (#223)

fix: replace deprecated datetime.utcnow() with timezone-aware alternative
This commit is contained in:
Gábor Lipták
2026-03-03 12:01:28 -05:00
committed by GitHub
parent 40df8ff9d6
commit 5f63d23836

View File

@@ -17,11 +17,10 @@ Dependencies: Python Standard Library Only
import argparse
import ast
import json
import os
import re
import sys
import yaml
from datetime import datetime
import datetime as dt
from pathlib import Path
from typing import Dict, List, Any, Optional, Tuple
@@ -36,7 +35,7 @@ class ValidationReport:
def __init__(self, skill_path: str):
self.skill_path = skill_path
self.timestamp = datetime.utcnow().isoformat() + "Z"
self.timestamp = dt.datetime.now(dt.timezone.utc).isoformat().replace("+00:00", "Z")
self.checks = {}
self.warnings = []
self.errors = []
@@ -650,4 +649,4 @@ Tier Options:
if __name__ == "__main__":
main()
main()