Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) O3-2154: Selecting a date should set selected date's time to midnight in the local timezone #197

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

vasharma05
Copy link
Member

@vasharma05 vasharma05 commented Apr 22, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

This PR looks into the following issues:

When a user selects a date, the date's equivalent in UTC is calculated and saved in the form. For the Timezones behind the UTC, when the user selects a date, the date's time is sent as 00:00:00 by the Date picker. Setting the date in the negative offset timezone would set the selected date as the previous one.

All the dates should be handled in local time zones

Screenshots

For Pacific time zone

After

Screen.Recording.2024-04-22.at.06.05.21.mov

Related Issue

https://issues.openmrs.org/browse/O3-2154

Other

Also, the tests are updated such that they should work in all timezones

Copy link

github-actions bot commented Apr 22, 2024

Size Change: -40 B (0%)

Total Size: 1.06 MB

ℹ️ View Unchanged
Filename Size Change
dist/184.js 203 kB 0 B
dist/207.js 6.07 kB 0 B
dist/225.js 9.82 kB 0 B
dist/272.js 6.59 kB 0 B
dist/294.js 2.63 kB 0 B
dist/366.js 6.94 kB 0 B
dist/486.js 90.4 kB 0 B
dist/51.js 237 kB -21 B (0%)
dist/693.js 1.58 kB 0 B
dist/709.js 2.42 kB 0 B
dist/787.js 822 B 0 B
dist/800.js 169 kB 0 B
dist/main.js 316 kB -19 B (0%)
dist/openmrs-form-engine-lib.js 3.4 kB 0 B

compressed-size-action

@samuelmale samuelmale merged commit 73d1ea6 into main Apr 22, 2024
5 checks passed
@samuelmale samuelmale deleted the fix/O3-2154 branch April 22, 2024 14:37
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.

2 participants