Energinet-DataHub / ARCHIVED-geh-charges

Apache License 2.0
7 stars 3 forks source link

GUI: Error message displayed when retrieving price series that crossed a switch in daylight savings time #1851

Closed PerTHenriksen closed 1 year ago

PerTHenriksen commented 1 year ago

In T-environment. We get an unexpected error when searching for prices on charge information TarID060

In T-001: A price series was submitted through B2B for Charge ID TarId060 that covered the 30th October 2022. Due to the switch to daylight savings time, the price series contained 25 positions/prices.

When you search for this price series in the frontend, below message is shown:

Application insights shows that backend throws an exception: Upon calling /v1/ChargePrices/Search this exception is thrown: NodaTime.AmbiguousTimeException

Specified argument was out of the range of valid values. (Parameter 'Local time 10/30/2022 2:00:00 AM is ambiguous in time zone Europe/Copenhagen')

Application insights also show another exception type: RangeError with message RangeError: Invalid time value

Acceptance criteria:

Mech0z commented 1 year ago

Error provoked in https://github.com/Energinet-DataHub/geh-charges/commit/d6fdce366afce8b32ab1c7093649dcc361bf2ca2 image

prtandrup commented 1 year ago

Tested in T-001

Used ChargeID TarId060 for testing, which is an hourly tariff.

AC1

It is possible to search and view price series that crosses switch in daylight savings time.

Implicitly verified thru AC2 and AC3 below.

AC2

23 prices displayed the day we switch to normal time (in March) and charge resolution = hourly AND the hour 02-03 is not shown.

Small deviation: The 2nd interval below, says 01-03, this was expected to be 01-02.

image.png

AC3

25 prices displayed the day we switch to DST (in October) and charge resolution = hourly AND the hour 02-03 is shown twice (the price might differ)

image.png

Small deviation: The first time interval says 02-02, where expected was 02-03. The deviation will be discussed with our SME.

prtandrup commented 1 year ago

After discussing the test results with our SME, the following must be fixed:

When switching to normal time in March, then the time intervals shown in the search results must be: 00-01 01-02 02-03 Either shown with no value or simply a dash / or interval not shown at all 03-04

When switching to DST in October, then the time intervals shown in the search results must be: 00-01 01-02 02-03 02-03 03-04

PerTHenriksen commented 1 year ago

AC1: image.png

AC2: image.png