-
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: updated the date time to support timezone #2820
Conversation
ee5a409
to
8c90912
Compare
73df502
to
e62b70b
Compare
e62b70b
to
dbbbdd6
Compare
initialTrendCursorDateString | ||
.split('\n') | ||
.join('T') | ||
.replace(/(\d+)\/(\d+)\/(\d+)/, '$3-$2-$1') |
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.
does the date-fns library not support this?
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.
supports. updated.
return ( | ||
<DateTime | ||
dateTime={ | ||
Number(round(latestValueTime, significantDigits)) * 1000 |
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.
we're rounding the date?
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.
yes.
return ( | ||
<div className='base-chart-legend-tc-header-container'> | ||
<div> | ||
<span>{date.toLocaleDateString()}</span> | ||
<span>{dateTime.split(' ')[0]}</span> |
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.
Ca we use the date-fns formatter here?
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.
yes, Done
dbbbdd6
to
5bf6c31
Compare
5bf6c31
to
443c847
Compare
87b7994
to
baad335
Compare
This PR is for ticket #2663 and added the timezone support for the date and time in xy-plot, KPI, and resource explorer
Verifying Changes
changes are not changing anything, date-time values are now adjusted to the timezone.
Legal
This project is available under the Apache 2.0 License.