# basecamp/local_time

Rails engine for cache-friendly, client-side local time

Repository: https://github.com/basecamp/local_time
Canonical: https://ross.abutalabs.com/products/local_time
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-07-13T13:16:23+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 92, release rhythm 61, longevity 100
- inputs: {"age_days": 4672, "days_push": 51, "days_rel": 51, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2002, forks 125 (observed 2026-08-28T04:06:04.418414+00:00)

## What it is
A Rails engine with a companion JavaScript component that renders <time> elements in UTC server-side and converts them to the browser's local time on the client. This keeps pages cache-friendly while still showing users times and dates in their own timezone.

## Use cases
- display timestamps in the user's local timezone in a Rails app
- show cached pages with correct local times
- render relative 'time ago' strings like '5 minutes ago'
- format dates and times client-side with strftime patterns
- avoid per-user timezone caching problems

## When to choose
- you have a Rails app with page or fragment caching and need per-user local times
- you want simple <time> element localization without heavy JS frameworks
- you need relative time-ago display that updates in the browser

## When to avoid
- your app is not built on Ruby on Rails
- you need full i18n/localization beyond date and time formatting
- you need a complete strftime implementation with all directives

## Facets
- artifact type: library
- maturity: stable
- function: templating, date-time, frontend-framework
- domain: web-development, backend
- platform: browser, ruby
- tags: rails-engine, timezone, cache-friendly, time-display, client-side-rendering, localization, web-server, javascript, nodejs

## Member repositories
- basecamp/local_time (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:04.418414+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:01:56.493593+00:00, confidence not recorded.
  - readme: https://github.com/basecamp/local_time (fetched 2026-08-28T04:06:04.418414+00:00, sha 947b3af7e606)
- Data as of 2026-08-30T08:39:29.467469+00:00.
