Lightweight utility functions for converting between UTC and timezone-aware datetimes using the Temporal API
npm install @gobrand/tiempo


Timezone conversions that don't suck. Built on the Temporal API.
š Documentation
- 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
``typescript
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"
`
`bash``
npm install @gobrand/tiempo
eng.gobrand.app/tiempo ā Full API reference, examples, and guides.
MIT Ā© Ruben Costa / Go Brand