Closed
Conversation
Member
|
I still did not review the PR. However, I don't think it's a great idea to have two time libs (date-fns /datejs). If date-fns is not good enough, we should move everything to the lib supporting everything. But are you sure date-fns don't support timezone? I see support on date-fns v4: https://date-fns.org/v4.1.0/docs/Time-Zones |
Contributor
Author
OK, I will set the version to date-fns v4 |
48fe9b9 to
0425188
Compare
Member
|
PR moved to: #83 |
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.
closes perses/perses#3935
Description
This change adjust the initial and subsequently updated time range with the time zone. This fix keeps all elements of date/time synced.
Please note, The AdapterDateFns uses standard JavaScript Date objects, which only recognize the browser's local time or UTC. It cannot "shift" to a specific IANA timezone like Europe/London internally. MUI's timezone prop explicitly requires an adapter that supports timezones, such as Day.js. Day.js allows you to extend its functionality with the utc and timezone plugins. This lets the adapter calculate the correct offsets
In the following screenshot my local timezone is CEST and I had changed the timezone to GMT+0 (London)
CEST is GMT+1. As you can see, everything is synced. Either, you change the range from the inputs or the x-picker control, everything should be synced.
Screenshots
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes
See e2e docs for more details. Common issues include: