Skip to main content

Daylight saving time - DST

· 4 min read
Dr. Anja Vinzelberg

Smart daylight savings time handling in ODSL?

In this blog we show you how to handle daylight savings time in OpenDataDSL.


Is your data management system prepared to cope with the fact that Sunday will have only 23 hours due to the clocks going forward for most of us this weekend?

Will you need to perform some manual data tasks to account for daylight savings time?

Smart Data Management!

OpenDataDSL handles DST automatically - work smarter globally!

What is Daylight saving time (DST) ?

There are various research papers on daylight savings time, generally these focus on the health impact, like sleep or heart attacks, others focus on the consequences on the economy. It is likely that there are research papers for every country checking the impact of daylight savings time on electricity demand or consumption.

Not to forget the variety of papers on the pros and cons of abolishing daylight saving time.

How many hours in a day?

A time zone that observes DST has 23 hours on the last Sunday in March and 25 hours on the last Sunday in October. The time between the last Sunday in October and the last Sunday in March is called daylight savings time. In practice, also the notation summer-time and winter-time is used.

Useful ODSL functions

daylightSavings: Checks a day to see if it is a daylight savings changeover day.


  • 0 if false
  • -1 if it is the start day of DST
  • 1 if it is the end day of DST


result = daylightSavings(date, timezone)

Example using year 2022: Last Sunday in March is 27th and last Sunday in October is 30th. Let's use the information and run the function above for time zone Europe/London, where daylight saving time is taken into account:

print daylightSavings(Date("2022-03-27"), "Europe/London")
print daylightSavings(Date("2022-10-30"), "Europe/London")

whereas in India, where no daylight saving time is considered, the result is:

print daylightSavings(Date("2022-03-27"), "Asia/Calcutta")
print daylightSavings(Date("2022-10-30"), "Asia/Calcutta")

Fill: Provides options how to treat missing data.


result = fill(input, method)

Input can be a list of time series or a single time series and method can be one of forward, backward, remove or linear.


data = fill(data, "forward")

ODSL data samples

Data Catalogue

Our OpenDataDSL Data Team is constantly adding new data sources to our Data Catalogue by defining smart OpenDataDSL data loaders.

Input data: raw file

Example: Daylight saving time in 2022

In this example we use data from the data provider OMIE, who is publishing electricity prices and volumes for Spain, Portugal and Iberia.

In particular we check the input raw file for the changeover days in 2022: 27th March and 30th October. The time zone for the data set is Europe/Madrid, which is UTC+1.


For the changeover day in March, the file only contains 23 entries, representing the prices for the 23 hours that day only has.


For the changeover day in October, the data raw file contains 25 entries for the 25 hours that day has.

Daylight saving time usage in ODSL

In the following we are looking at the created hourly forward curves for the changeover days.


The values are loaded from the input raw file. In ODSL - according to the following screenshot - we notice the expected missing hour 2:00 - 2:59, (absolute tenor), whereas the relative tenors show up nicely without a gap.


Again, the values are loaded from the input raw file in ODSL - according to the following screenshot - we notice the expected doubled hour 2:00 - 2:59, (absolute tenor).

Next steps

Ready to see ODSL in action?

Fill out the form below, we will contact you to arrange a personally tailored demo.

How about a demo?

Our team is here to find the right solution for you, contact us to see this in action.

+44 1245 555053

Fill out your details below and somebody will be in contact with you very shortly.

We'll never share your email address
Enter information about your area of interest, include your telephone number if you would like us to call you.

More information or free trial?

Tell us about your project, and we can let you know how we can help.

Contact us at

Further Reading