Skip to content

ci: write the dummy prices in UTC, so that the day before a clock change works - #2760

Open
charanteja25 wants to merge 3 commits into
FlexMeasures:mainfrom
charanteja25:fix/docker-build-dst-day
Open

charanteja25 wants to merge 3 commits into
FlexMeasures:mainfrom
charanteja25:fix/docker-build-dst-day

Conversation

@charanteja25

@charanteja25 charanteja25 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part of #2761.

  • ci/generate-dummy-price.sh now writes the 24 hourly rows as UTC times that start at midnight in Amsterdam, instead of as local times without an offset. The prices and their order are the same.
  • docker-build.yml loads them with --timezone utc, instead of --timezone Europe/Amsterdam.
  • Added changelog item in documentation/changelog.rst

On a normal day the rows are the same instants as before (22:00Z in summer and 23:00Z in winter for the first row). So the "Add Process schedule" step, which asks for prices from ${TOMORROW}T00:00:00+02:00, keeps its price window.

Look & Feel

Before, on 24 October 2026 (tomorrow is the day the clocks go back), the step "Add beliefs" failed:

pytz.exceptions.AmbiguousTimeError: Cannot infer dst time from 2026-10-25 02:00:00 as there are no repeated times

On 27 March 2027 it would fail with NonExistentTimeError: 2027-03-28 02:00:00.

How to test

The check build-docker-image / Build Docker Image of this PR runs on the day before a clock change, so it tests the fix on a real runner.

I also tested it before pushing:

  • In memory, with timely_beliefs.read_csv and the prices from the script, for 2026-10-25 and 2027-03-28. With Europe/Amsterdam both give the errors above. With utc both are read as 24 rows.
  • The new script, run with GNU date for four "tomorrow" values (25 Oct 2026, 28 Mar 2027, a summer day and a winter day). Each gives 24 different times and the same 24 prices as before.

Further Improvements

The same recipe is in documentation/tut/scripts/run-tutorial-in-docker.sh (manual QA workflow) and in documentation/tut/toy-example-setup.rst. I did not change them here.

Related Items

Part of #2761.


Sign-off

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

…nge works

The Docker build check wrote the prices for tomorrow as local times without an offset, and loaded them with --timezone Europe/Amsterdam. On the day before a clock change that fails. In October the hour from 02:00 happens twice, and the file has it once (AmbiguousTimeError). In March the hour at 02:00 does not exist (NonExistentTimeError).

Write the 24 hourly rows as UTC times that start at midnight in Amsterdam, and load them with --timezone utc. On a normal day these are the same instants as before. On the two days of a clock change, the 24 rows are 24 different hours.

Signed-off-by: charanteja25 <charanteja.teja25@gmail.com>
Signed-off-by: charanteja25 <charanteja.teja25@gmail.com>
Signed-off-by: Gunisetty Venkata Charan Teja <charanteja.teja25@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant