lunetics/timezone-bundle
Symfony bundle that detects a visitor's timezone from their IP address and exposes it through a simple service, with configurable fallbacks for timezone-aware applications.
Auto-detect vs. ask the user. Unchanged. The core decision this package informs is whether timezone should be inferred from the request or explicitly confirmed by the user. It supports scoping that feature as a defaulting convenience — one that reduces onboarding friction for scheduling, reminders, digest windows, "today" boundaries, and reporting periods — rather than as a standalone capability.
Build vs. buy vs. borrow. Still a reference implementation, not a dependency. The 4.x line is real, but it remains a Symfony bundle with no Laravel integration path. Server-side detection is a small, bounded problem (IP → geolocation → timezone, plus a fallback), which argues against paying a vendor and toward ~1 sprint of in-house work on top of an IP geolocation provider we already contract with.
Data model and provenance. Reinforces the decision to store all timestamps in UTC, render in the user's timezone, and persist a per-user preference with provenance — detected vs. user_confirmed — so we can silently re-detect on travel without overwriting an explicit choice.
Roadmap sequencing / deprioritization. Low opportunity score (0.49), 26 stars, and 0 dependents still signal thin market pull. The 4.0.1 release confirms the project is alive and shipping, but liveness is not demand. Timezone handling is table stakes correctness, not a differentiator: fund "UTC everywhere + user-set timezone" first; schedule auto-detection only when a launch in a multi-timezone market makes the defaulting friction measurable.
Localization and GTM readiness. Informs launch checklists for multi-region releases — whether customer-facing emails, digests, deadlines, and billing cutoffs display in local time, and whether support/CS tooling shows the customer's local clock.
Version-support risk is now a first-class signal. 4.0.0 modernized the bundle off the Symfony2-only line, but 4.0.1's own corrections confirm no released version supports Symfony 6.4 — the current LTS — and that 4.0.0's guidance on this sent users to an unsatisfiable Composer resolution. A dependency with a documented gap at the current LTS is a known upgrade tax, not a hypothetical one.
Not a decision driver. The package's API surface and scope remain Symfony-shaped, and its release history now shows a documentation defect shipped in a major. It should not anchor architecture, vendor selection, or security posture.
Consider it only if: you maintain a Symfony 5.4 or Symfony 6.0–6.3 application on PHP 8.x, your architecture is already bundle-based, you need a quick IP-based guess at the user's timezone as a form default, and you accept a dependency with zero downstream users and no supported path to Symfony 6.4+ without waiting on upstream.
Look elsewhere (or build) if any of the following are true:
Intl.DateTimeFormat().resolvedOptions().timeZone is more accurate and free — make it the primary signal and IP the fallback, which is the inverse of this package's approach.DateTimeZone/tzdata or Carbon; don't inherit a pinned timezone table from a bundle whose version support is already behind.Verdict: Do not adopt. 4.0.1 is documentation and release-gate work only — no runtime code changed, no new capability, no Laravel path, and no Symfony 6.4 support. Mine the README for the detection flow, then build a thin internal timezone-defaulting service: browser signal first, IP geolocation fallback, explicit user override always wins.
For executives: We re-evaluated the PHP timezone library on its new release and are still recommending we don't adopt it. The project did ship a modernized 4.x line, which is a better signal than we had before, but it has 26 stars, no downstream users, no support for Symfony 6.4 (the current LTS), and this release itself is a correction of documentation errors shipped in the major. Adopting it would add an upgrade ceiling and a support liability to gain a convenience feature. The underlying capability is small and well understood: we can deliver a browser-first, IP-fallback timezone default in about one sprint using tooling we already pay for, with no new vendor and no new dependency.
For engineering: The bundle is no longer Symfony2-only, so our old "won't even install" framing needs updating — the accurate blocker is that it's still a Symfony bundle (not installable or useful in our Laravel stack) and its 4.0.0 constraint set stops below Symfony 6.4, which 4.0.1 explicitly confirms. 4.0.1 changes no runtime code: it fixes a 4.0.0 doc statement that pointed 6.4 users at the legacy 3.0 line (unsatisfiable Composer resolution), dates an unreleased-labelled changelog entry, makes risky tests fail the suite, and requires the profiler template in the distribution gate. Those are real hygiene improvements — cheap to mirror in our own CI — but they don't make it a candidate. Our plan is unchanged: take the browser's Intl timezone as the primary signal (more accurate than IP, and free), fall back to our existing IP geolocation provider for first-touch defaults, store every timestamp in UTC, persist a user timezone preference tagged detected or confirmed, and never overwrite a confirmed value automatically. We keep DST correctness in PHP's tzdata/Carbon rather than in application code.
Risk if we defer: Low, and unchanged. Users can already set their timezone manually; detection only removes a step. The real exposure sits in incorrect UTC storage and display logic, which we should fix regardless of whether detection ever ships.
How can I help you explore Laravel packages today?