Repository navigation
fix: show dataset download date in UTC - #287
Open
brevitywithorion wants to merge 1 commit into
Open
brevitywithorion wants to merge 1 commit into
brevitywithorion wants to merge 1 commit into
Conversation
|
@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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.formatUtcDateString()inFeed.functions.tsx. It returns the sametoDateString()style ("Mon Sep 29 2025") but uses the UTC calendar date.PreviousDatasets.tsxuses it for the date cell and the four aria-labels that repeat the date.Fixes #247
Expected behavior:
A dataset with
downloaded_atof2025-09-29T00:45:00Zshows "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
formatUtcDateStringand ran them withTZ=America/Los_AngelesandTZ=Asia/Tokyo.yarn test:ci: 46 suites, 609 tests passed.yarn lint: no errors (only the 3 existing warnings).npx tsc --noEmitis clean.Run the unit tests with
yarn testto make sure you didn't break anythingAdd 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)