timezone-safety

Enforce consistent UTC handling across code, databases, and APIs.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/git-tao/taotang-website --skill timezone-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: timezone-safety
Source: https://github.com/git-tao/taotang-website/tree/main/.claude/skills/timezone-safety
Command: npx skills add https://github.com/git-tao/taotang-website --skill timezone-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents timezone-related bugs by enforcing consistent UTC handling across code, databases, and APIs.

Core Features & Use Cases

  • Enforces consistent UTC usage for internal timestamps, storage, and data transfer.
  • Guides proper database types, API formats, and frontend displays to avoid timezone discrepancies.
  • Use Case: When building a multi-region app, store and communicate times in UTC to prevent drift and misinterpretation.

Quick Start

Start by auditing date/time usage in your project and adopt UTC-first conventions for new code.

Frequently Asked Questions about timezone-safety

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle UTC timestamps across database, API, and frontend layers?

To handle UTC timestamps across databases, APIs, and frontends, enforce consistent UTC usage internally, use TIMESTAMPTZ for database storage, and apply ISO 8601 with Z for API responses to prevent drift.

What is the best way to format datetime in API responses to avoid timezone bugs?

The best way to format datetime in API responses is using ISO 8601 with the Z suffix. This enforces consistent UTC handling for data transfer and prevents timezone discrepancies across multi-region applications.

Why do timezone discrepancies happen in multi-region applications?

Timezone discrepancies happen when internal timestamps are not stored or communicated in UTC. Mixing local times with database timestamps without TIMESTAMPTZ causes drift and misinterpretation across different regions.

How do I convert UTC timestamps for UI display without causing offset errors?

To convert UTC timestamps for UI display without offset errors, maintain UTC usage internally and perform safe comparisons by converting times to the user's local timezone only at the frontend rendering stage.

Do I need TIMESTAMPTZ in my database if I already use UTC in the backend?

Yes, you need TIMESTAMPTZ in your database even if your backend uses UTC. TIMESTAMPTZ ensures the database properly recognizes and stores timezone-aware timestamps, preventing data misinterpretation during queries.

When should I audit date and time usage to prevent timezone-related bugs?

You should audit date and time usage before adopting UTC-first conventions for new code. Auditing existing datetime usage identifies local time dependencies and ensures safe comparisons across backend and frontend workflows.