Skip to content

feat(dateTimes): multiple timezones epic#9081

Merged
rohan-bes merged 261 commits intomainfrom
epic-multiple-timezones
Mar 5, 2026
Merged

feat(dateTimes): multiple timezones epic#9081
rohan-bes merged 261 commits intomainfrom
epic-multiple-timezones

Conversation

@dannash100
Copy link
Copy Markdown
Contributor

@dannash100 dannash100 commented Jan 29, 2026

Changes

Add a brief description of the changes in this PR to help give the reviewer context.

Deploys

  • Deploy to Tamanu Internal

Tests

  • Run E2E Tests

Remember to...

  • ...write or update tests
  • ...add UI screenshots and testing notes to the Linear issue
  • ...add any manual upgrade steps to the Linear issue
  • ...update the config reference, settings reference, or any relevant runbook(s)
  • ...call out additions or changes to config files for the deployment team to take note of

dannash100 and others added 30 commits January 16, 2026 09:55
Introduce withDateTimeContext HOC and useDateTimeFormat hook for PDF components
to ensure consistent timezone-aware date formatting across all printouts.

- Add formatInTz utility for explicit format string patterns
- Create self-contained PDF date context to avoid React instance conflicts
- Migrate all printout components from getDisplayDate to context-based formatters
- Update patientAccessors and labRequestAccessors to accept formatters
- Replace time-only formats with formatTime where applicable
Integrate DateTimeContext from ui-components across all web components.

Changes:
- Add DateTimeProvider wrapper in Root.jsx
- Update all date display components to use useDateTimeFormat hook
- Migrate from direct date-fns calls to context-based formatters
- Update forms, views, and tables for consistent timezone handling
…ocationBookingDrawer.jsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
dannash100 and others added 15 commits February 26, 2026 10:34
* nice wit it

* ibiza tweakin

* ya

* ya

* ya

* Update packages/web/app/components/Surveys/getComponentForQuestionType.jsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* thank u ai for everything

* wa

* ok

* ok

* wa

* thats correcT

* stone cold gotem

* thanks agian

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…9246)

* thanks agian

* yeah nice

* yeah nice

* last spot

* ya ok

* ya

* ya

* ya
…timezone internally (#9188)

* upgrade mui datefields

* dam it works

* dam it works

* perfect

* yayer

* yayer

* cleaner

* looks gud

* looks gud

* looks gud

* yayer

* ya

* comments

* comments

* cleanups

* cleanups

* fix

* ya

* ok

* ok

* refactor(dateField): clean up DateInput after MUI migration

- Extract DATETIME_LOCAL_FORMAT constant (was repeated 4 times)
- Extract emitChange helper to DRY the synthetic event shape
- Simplify handleSetToday to use effectiveTimezone directly,
  fixing inconsistency when timezone prop overrides context

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor(dateField): use getFacilityNowDate for todayDate

Remove getTodayInTimezone helper and unused imports
(getCurrentDateStringInTimezone, startOfToday) — getFacilityNowDate
already produces the correct Date for the effective timezone.

Co-authored-by: Cursor <cursoragent@cursor.com>

* last tweaks

* ya

* never did anything?

* never did anything?

* fix comment

* gottem

* ya

* ya

* fix: no-issue: auto-fix 4 review suggestions

Co-Authored-By: Review Hero <contact@bes.au>

* perf changes

* try this

* performance tweak

* fix deps

* fix deps

* fix mobile

* bump date picker zindex

* good catch

* ya

* comments

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: review-hero[bot] <2896273+review-hero[bot]@users.noreply.github.com>
Co-authored-by: Review Hero <contact@bes.au>
@dannash100
Copy link
Copy Markdown
Contributor Author

bugbot run

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Copy link
Copy Markdown
Contributor

@tcodling tcodling left a comment

Choose a reason for hiding this comment

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

Great work on this one! So finicky and complicated

@rohan-bes rohan-bes changed the title epic: multiple timezones epic(dateTimes): multiple timezones Mar 5, 2026
@rohan-bes rohan-bes changed the title epic(dateTimes): multiple timezones feat(dateTimes): multiple timezones epic Mar 5, 2026
@rohan-bes rohan-bes merged commit 5894fa3 into main Mar 5, 2026
146 of 150 checks passed
@rohan-bes rohan-bes deleted the epic-multiple-timezones branch March 5, 2026 05:57
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.

4 participants