@gobrand/tiempo
v2.8.1
Published
Lightweight utility functions for converting between UTC and timezone-aware datetimes using the Temporal API
Maintainers
Readme
tiempo
Timezone conversions that don't suck. Built on the Temporal API.

- Zero timezone bugs - Real IANA timezone support, not UTC offset hacks
- DST-aware math -
addDays(1)means tomorrow, even across clock changes - Nanosecond precision - When milliseconds aren't enough
- Type-safe - Full TypeScript, catches datetime errors at compile time
- Familiar API - If you've used date-fns, you already know this
import { toZonedTime, addDays, format, toIso } from '@gobrand/tiempo';
// Backend sends UTC
const utc = "2025-03-09T07:00:00Z";
// Convert to user's timezone, manipulate, format
const userTime = toZonedTime(utc, "America/New_York");
const tomorrow = addDays(userTime, 1); // DST transition handled correctly
const display = format(tomorrow, "EEEE 'at' h:mm a"); // "Monday at 2:00 AM"
// Send back to backend as ISO 8601 string
const payload = toIso(tomorrow); // "2025-03-10T06:00:00Z"Install
npm install @gobrand/tiempoDocs
eng.gobrand.app/tiempo — Full API reference, examples, and guides.
License
MIT © Ruben Costa / Go Brand
