Skip to content

Online event time-conversion label names a place from IP but clocks it from the OS timezone #64

Closed

Description

@Ardnived

Problem

For online events, useEventDisplay builds the faded whereSubtext line (" in ") from two independent sources:

  • the place name comes from the IP geolocation lookup — useIpLocation(...)?.region (ipwho.is)
  • the time is converted using the browser's OS timezone — resolveEventDisplay defaults viewerTz to DateTime.local().zoneName

When those disagree — VPN, a traveller whose laptop is still on home time, or a mislocating IP database — the label asserts a region whose local clock is not the time shown (e.g. "10 AM in British Columbia" where 10 AM is actually the laptop's home-zone wall clock). This is exactly the mislabelling the #52 removal of the "(your time)" hint was meant to avoid.

Surfaced by the /finalize-pr code-review of #58 (dismissed there as a pre-existing best-effort label; tracked here).

Options

  • (a) Name the place from the same zone the clock uses — zoneCity(viewerTz) ("… in Vancouver") — so label and time share one source.
  • (b) Keep the IP region only when its offset agrees with the OS zone; otherwise show the bare converted time with no place name.
  • (c) Capture ipwho.is's timezone in IpLocationSchema and reconcile the label against it explicitly.

Acceptance

  • The labelled place and the shown time always describe the same timezone.
  • A unit test with a mismatched IP-region / OS-zone renders the safe form (no contradictory place label).

Files

  • src/hooks/use-event-display.ts (whereSubtext)
  • src/lib/shape/event.ts (resolveEventDisplay viewerTz)
  • src/lib/time.ts (zoneCity), possibly src/types/ip-location.ts

Activity

  1. added a commit that references this issue on Jul 21, 2026
    3437b6d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Hold Until

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions