Skip to content

[Bug]: SvgChartTimeAxis TimeValue does not take local time of other regions into account. #6681

Description

@Floris-D

Blazorise Version

Latest

What Blazorise provider are you running on?

Bootstrap5

Link to minimal reproduction or a simple code snippet

https://github.com/tacoWanneeJama/BlazorBugTestApp.git

Steps to reproduce & bug description

To simulate this bug a SvgScatterChart has been used with an X-Axis based on time.
To create this X-Axis the SvgChartTimeAxis has been used.
The TimeValue is given a DateTime that has been parsed and originates from a List Tuple.

The first graph uses a Tupled list where the DateTime values in the list have been overwritten with .ToLocalTime()
The Second graph uses a Tupled list where the DateTime values have not been altered in anyway.

Now to simulate the bug:

  1. Make sure the system time and/or local time is based on CEST (UTC+2) time.
  2. Navigate to the timeGraph page by clicking the button named: "Time Graph" in the left navbar.
  3. A page with to Graphs should appear.
  4. Check the left graph first. This is the first graph that has the altered date times.
  5. Hover over one of the dots until the infobox appears and read the time value.
  6. Compare the time from the infobox with the approximated time on the X-axis of the graph.
  7. It should be apparend that the time is off with two hours.
  8. repeat step 4 to 6 for the second graph as well.

What is expected?

What should be expected is that the X-axis corresponds with the information the dots give when hovered over and takes into account of the local time user is in.

As an example. If the user would be in a CEST (UTC+2) timezone and the DateTime is 7:00:00 the dot should be above the 7:00:00 mark on the X-Axis.

What is actually happening?

What is happening now is that the DateTime that is 7:00:00 stands above the 5:00:00 mark on the X-Axis.
Which is correct in UTC but not in UTC+2 which is where the user or database is currently located in.

What browsers do you see the problem on?

Chrome

Any additional comments?

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

Status
✔ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions