NAS-132019 / 25.04 / Remove DST gaps from chart reports #11086
+60
−0
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.
Changes:
Screenshot attached to a ticket depicts the DST gap, which occurs when server's internal clock does a transition from time point
1:59
to time point3:00 GMT+0100
, and timezone info (GMT+0100
) is lost, resulting in representational 1:01 hour gapIn pseudocode:
Actual:
Expected:
This PR removes DST gaps from reporting time series.
Testing:
To simulate DST, you need to add the
addDstGaps
method in the src/app/pages/reports-dashboard/reports.service.ts file and apply it toreportingData.data
as shown below:Replace the constant
dstTimestamp
with the value of the DST change time (in seconds!).For example,
1732168676
<=>Thu Nov 21 2024 08:57:56 GMT+0300
.A gap of one hour should appear on the chart:
Using the
removeDstGaps
method should remove this gap.addDstGaps
method code: