Skip to content

fix: show dataset download date in UTC - #287

Open
brevitywithorion wants to merge 1 commit into
MobilityData:mainfrom
brevitywithorion:fix/dataset-history-downloaded-utc
Open

brevitywithorion wants to merge 1 commit into
MobilityData:mainfrom
brevitywithorion:fix/dataset-history-downloaded-utc

Conversation

@brevitywithorion

Copy link
Copy Markdown

Summary:

The dataset history table showed the download date with new Date(...).toDateString(), which uses the browser's timezone. Downloads start at midnight UTC, so a dataset downloaded at 00:45 UTC on Sep 29 showed as Sep 28 for anyone west of UTC.

  • Added formatUtcDateString() in Feed.functions.tsx. It returns the same toDateString() style ("Mon Sep 29 2025") but uses the UTC calendar date.
  • PreviousDatasets.tsx uses it for the date cell and the four aria-labels that repeat the date.
  • Column header is now "Downloaded On (UTC)" / "Téléchargé le (UTC)", per the suggestion in the issue comments.

Fixes #247

Expected behavior:

A dataset with downloaded_at of 2025-09-29T00:45:00Z shows "Mon Sep 29 2025" under "Downloaded On (UTC)" in every timezone.

Testing tips:

Open a GTFS feed page with dataset history and set your system timezone to something west of UTC (e.g. America/Los_Angeles). Datasets downloaded shortly after midnight UTC should now show the UTC date.

  • Added unit tests for formatUtcDateString and ran them with TZ=America/Los_Angeles and TZ=Asia/Tokyo.

  • yarn test:ci: 46 suites, 609 tests passed.

  • yarn lint: no errors (only the 3 existing warnings). npx tsc --noEmit is clean.

  • Run the unit tests with yarn test to make sure you didn't break anything

  • Add or update any needed documentation to the repo

  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).

  • Linked all relevant issues

  • Include screenshot(s) showing how this pull request works and fixes the issue(s) (I didn't have the app running against live data for a screenshot; the change is the date text and header label only)

@vercel

vercel Bot commented Dec 3, 2026

Copy link
Copy Markdown

@brevitywithorion is attempting to deploy a commit to the MobilityData Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Downloaded At column in Dataset history can appear off by one day

1 participant