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

feat: timezone support via get time offset #2680

Closed
wants to merge 28 commits into from

Conversation

Chandru-HM
Copy link
Contributor

This PR is for ticket #2663 and added the timezone support via get time offset.

Verifying Changes

timezone-support.mov

Legal

This project is available under the Apache 2.0 License.

@Chandru-HM Chandru-HM force-pushed the feat/timezone-support branch from c7adc6a to b849b13 Compare March 27, 2024 08:52
@Chandru-HM Chandru-HM force-pushed the feat/timezone-support branch 2 times, most recently from ac855e0 to e2db458 Compare April 1, 2024 14:19
) : (
<DateTime
dateTime={point.x}
pattern='dd/MM/yyyy, HH:mm:ss'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make these constants? I believe this exists already here - packages/react-components/src/utils/time.ts

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, let's default the DateTime componeent to this so we don't need to pass it everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.
Now the default pattern is 'M/d/yy HH:mm:ss' and created a constant ('dd/MM/yyyy, hh:mm:ss' ) as you mentioned to use in react-components.

creationDate ? getFormattedDateTime(creationDate) : '-',
creationDate ? (
<DateTime
dateTime={creationDate.getTime()}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to change creationDate to a number prop? I don't think we should do a bunch of conversions number -> date -> number ->date. I think all of the places we have dates (except for probably viewport) should start as numbers.

@Chandru-HM Chandru-HM force-pushed the feat/timezone-support branch 8 times, most recently from f1a813d to 3e37408 Compare April 4, 2024 07:15
@Chandru-HM Chandru-HM force-pushed the feat/timezone-support branch 2 times, most recently from 3653a6a to 9fcc3a5 Compare April 19, 2024 06:51
@Chandru-HM Chandru-HM force-pushed the feat/timezone-support branch from 9fcc3a5 to 2fc28b2 Compare April 30, 2024 06:08
@Chandru-HM Chandru-HM force-pushed the feat/timezone-support branch 4 times, most recently from 4dc5fb2 to ae7894d Compare May 3, 2024 10:51
@Chandru-HM Chandru-HM force-pushed the feat/timezone-support branch 2 times, most recently from d64030b to 720dc54 Compare May 6, 2024 11:30
@Chandru-HM Chandru-HM force-pushed the feat/timezone-support branch from 720dc54 to dd433f8 Compare May 7, 2024 07:12
@Chandru-HM
Copy link
Contributor Author

closed this PR due to many conflicts from the back merge. created the new one for the same #2820

@Chandru-HM Chandru-HM closed this May 22, 2024
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.

7 participants