ibpsa / modelica-ibpsa

Modelica library for building and district energy systems developed within IBPSA Project 1
https://ibpsa.github.io/project1
145 stars 84 forks source link

daylight savings support for WeeklySchedule #1904

Open Mathadon opened 4 months ago

Mathadon commented 4 months ago

For long simulations (longer than a few weeks), the local timezone may shift by one hour for daylight savings. We currently do not support that in the weekly schedule. Moreover, different regions perform the shift at different timestamps so we cannot hardcode the shift. My proposal would be to add optional support for this by adding a line in the config file like the two ones at the bottom:

# Comments start with a # 
mon:0:0:10          -  3   1  -
# Comments can be added in the table too 
tue,thu:20:30:59  123  -  45  -
wed                12  1   4  -
# users can set a timezone using a unix timestamp
1711877694         summertime
1730367294       wintertime

The switch would only work if the Modelica built in variable time is in the same range as the unix time stamp used since the weekly schedule does not know which year we are in.

Would it make sense to add this to IBPSA?

mwetter commented 4 months ago

A couple of comment:

Mathadon commented 4 months ago

Thanks for the feedback:

mwetter commented 4 months ago

@Mathadon : If it is not daylight savings time, it is standard time.