portable-datetime

Convert timestamps between UTC and local timezones.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/eykd/vance-ts --skill portable-datetime
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: portable-datetime
Source: https://github.com/eykd/vance-ts/tree/main/.claude/skills/portable-datetime
Command: npx skills add https://github.com/eykd/vance-ts --skill portable-datetime

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you write portable datetime handling code that works across timezones, ensuring consistency in data storage, calculations, and display.

Core Features & Use Cases

  • UTC Sandwich Pattern: Standardizes datetime operations by converting to UTC, working in UTC, and converting back to local timezones.
  • Time Storage: Store timestamps in UTC to ensure portability and consistency across databases and systems.
  • Time Conversion: Converts timestamps to and from UTC and local timezones as needed.
  • Use Case: For instance, a developer can use this Skill to write scheduling logic that is timezone-independent, ensuring that events are scheduled correctly regardless of the server's location.

Quick Start

Run the portable-datetime skill with the following command: portable-datetime convert 2025-01-15T12:00:00.000Z 'America/New_York'

Frequently Asked Questions about portable-datetime

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

FAQPage Schema
What is the UTC Sandwich pattern for timezone conversion?

The UTC Sandwich pattern standardizes datetime handling by converting local time to UTC, performing calculations in UTC, and converting back to local timezones for consistent portable timezone conversion.

How do I store datetime values to ensure portability across different server locations?

Store timestamps in UTC to ensure portability and consistency across databases and systems, which guarantees that UTC datetime storage maintains consistent scheduling logic regardless of the server's physical location.

What's the best way to handle timezone-independent scheduling logic in applications?

Using the UTC Sandwich pattern for timezone conversion ensures that events are scheduled correctly regardless of the server's location, providing timezone-independent scheduling logic that works across various timezones.

Can I convert a UTC timestamp to a specific local timezone like America/New_York?

Yes, timezone conversion to specific local timezones like America/New_York is supported by converting UTC timestamps back to local datetime formats, ensuring accurate time display across various timezones.

Why does my application calculate datetime differently when deployed to servers in different timezones?

Performing datetime calculations in local time instead of UTC causes timezone inconsistencies, but converting to UTC first and applying the UTC Sandwich pattern ensures consistent calculations across various server timezones.