-
Notifications
You must be signed in to change notification settings - Fork 60
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
Conversation
c7adc6a
to
b849b13
Compare
ac855e0
to
e2db458
Compare
) : ( | ||
<DateTime | ||
dateTime={point.x} | ||
pattern='dd/MM/yyyy, HH:mm:ss' |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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()} |
There was a problem hiding this comment.
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.
f1a813d
to
3e37408
Compare
3653a6a
to
9fcc3a5
Compare
9fcc3a5
to
2fc28b2
Compare
4dc5fb2
to
ae7894d
Compare
d64030b
to
720dc54
Compare
720dc54
to
dd433f8
Compare
dd433f8
to
154ea32
Compare
closed this PR due to many conflicts from the back merge. created the new one for the same #2820 |
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.