Skip to content

fix: format time to utc#1414

Open
NishaSharma14 wants to merge 3 commits into
developmentfrom
format-time-to-utc
Open

fix: format time to utc#1414
NishaSharma14 wants to merge 3 commits into
developmentfrom
format-time-to-utc

Conversation

@NishaSharma14
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates duplicated per-component date formatting helpers into the global resources/js/Mixins/Global.js mixin and introduces UTC-aware formatters (formatUtcDate, formatRecordTimestampUtc) so release dates render the intended calendar day regardless of viewer timezone. Components that previously defined local formatDate helpers now call the shared mixin methods, and the embargo banner plus the scheduled-release card switch to UTC formatters to avoid off-by-one day shifts.

Changes:

  • Add formatUtcDate, formatShortDate, and formatRecordTimestampUtc to Global.js and add null guards to existing formatDate/formatDateTime.
  • Replace local per-component date formatters in StudyCardPublic.vue, ProjectCard.vue, FileSystemBrowser.vue, Study/Files.vue, and Public/Project/Show.vue with the global helpers.
  • Use UTC formatters in Public/Project/Layout.vue (embargo banner) and Project/Index.vue (scheduled release card).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
resources/js/Mixins/Global.js Adds new UTC and short-date helpers; adds null guards to existing helpers.
resources/js/Shared/StudyCardPublic.vue Removes local formatDate; relies on global mixin.
resources/js/Shared/ProjectCard.vue Switches template calls to formatShortDate and drops local helper.
resources/js/Shared/FileSystemBrowser.vue Uses formatRecordTimestamp for file rows; removes local formatDate.
resources/js/Pages/Study/Files.vue Same swap to formatRecordTimestamp and helper removal.
resources/js/Pages/Public/Project/Show.vue Uses formatShortDate for published/created dates; removes local helper.
resources/js/Pages/Public/Project/Layout.vue Embargo banner uses formatUtcDate; removes local helper.
resources/js/Pages/Project/Index.vue Scheduled release card uses formatRecordTimestampUtc.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.45%. Comparing base (69edb6c) to head (c273958).
⚠️ Report is 78 commits behind head on development.

Additional details and impacted files
@@                Coverage Diff                 @@
##             development    #1414       +/-   ##
==================================================
+ Coverage          56.63%   75.45%   +18.81%     
- Complexity          2268     3331     +1063     
==================================================
  Files                207      234       +27     
  Lines               8733    12477     +3744     
==================================================
+ Hits                4946     9414     +4468     
+ Misses              3787     3063      -724     
Flag Coverage Δ
unittests 75.45% <ø> (+18.81%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@NishaSharma14 NishaSharma14 self-assigned this May 28, 2026
Copy link
Copy Markdown
Member

@vcnainala vcnainala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use Carbon/Carbon

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.

Project release date is displayed wrong due to timezone formatting

3 participants