Time Zone Safety

•
777
•

Enforces robust time zone management to prevent data inconsistencies and production errors caused by system-dependent time calls.

The Time Zone Safety skill provides a comprehensive framework for avoiding common pitfalls associated with server-side time handling. It identifies and corrects 'naked' time calls (like LocalDate.now() or new Date()) that often lead to statistical errors and data drift when code is deployed across different environments, such as a local machine in Asia/Shanghai vs. a Docker container in UTC. By enforcing project-level business time zone constants and providing language-specific implementation patterns for Java, Go, Python, and JavaScript, it ensures that period calculations, database storage, and cross-timezone comparisons remain accurate and reproducible regardless of host system settings.

주요 기능

01Provides clear strategies for database time storage consistency (DATETIME vs. TIMESTAMP)
02Promotes the use of Instant and explicit ZoneId over implicit local defaults
03Detects unsafe 'naked' time calls like .now() or new Date() across multiple languages
04777 GitHub stars
05Standardizes business-sensitive calculations for week, month, and day boundaries
06Ensures alignment between JDBC drivers, Docker environments, and application logic

사용 사례

01Standardizing financial or reporting logic where 'start of day' must match a specific business time zone
02Refactoring legacy backend services to handle cross-region deployments without data drift
03Debugging and preventing issues where database records are saved with the wrong time offset