Community
OpenEnergyMonitor

Community

Scheduler inverted DST?

I am trying to implement a dual rate schedule

For that i followed others posts in creating schedules.
My TimeZone is GMT - Lisbon +01h

Today, is Saturday and is Summer time

However running this two schedules gives me the inverse result as expected:
Winter| Sat |00:00-23:59 = returns TRUE
Summer| Sat |00:00-23:59 = returns FALSE

Furthermore the two schedules below

Winter|Mon-Fri|07:00-23:59, Sat|09:30-12:59,18:30-21:59
and
Summer| Mon-Fri|07:00-23:59, Sat|09:00-13:59,20:00-21:59
Both return TRUE

I did try the following variations as well
Winter|Mon-Fri|07:00-23:59, Winter|Sat|09:30-12:59,18:30-21:59 = returns TRUE
Summer| Mon-Fri|07:00-23:59, Summer|Sat|09:00-13:59,20:00-21:59 =returns False
Seems winter/summer needs to be noted in each block, however the sumer/wintoer logic is inverted?

I did set my emonpi account to Lisbon time, so is a bit strange that the behavour is like this
Am i doing a mistake on the sintax?

After a bit of further investigation, seems basicly the expressions winter/Summer are simply ignored.

Also it seems no matter what i do even using pi localization to adjust the timezone, emoncm ignores them and uses GMT+0 to match times in scheduler

Context:
Server

OS
Linux 4.14.71-v7+
Host
emonpi | emonpi | (fe80::c048:aa5d:c7d5:7a68)
Date
2019-08-10 23:08:27 BST
Uptime
23:08:27 up 18 min, 1 user, load average: 0.46, 0.41, 0.26

Schedule Expression : Showing as “True”:
“Winter|Mon-Fri|00:00-06:59, Sat|00:00-09:29,13:00-18:29,22:00-23:59, Sun|00:00-23:59”

Schedule expression returned ‘true’.
Output:

Details:
Expression =Winter|Mon-Fri|00:00-06:59, Sat|00:00-09:29,13:00-18:29,22:00-23:59, Sun|00:00-23:59
Input =22:10:08 Sat 10-08-2019 0 GMT+0000
Day =00:00:00 Sat 10-08-2019 0 UTC
HrMin =22:10:08 Sat 10-08-2019 0 UTC
WeekDay =Sat


MATCH
Array
(
[0] => Winter|Mon-Fri|00:00-06:59,
[1] => Winter|
[dst] => Winter
[2] => Winter
[3] =>
[4] => Winter
[5] =>
[days] =>
[6] =>
[7] =>
[8] =>
[9] => Mon-Fri|
[daysweek] => Mon-Fri
[10] => Mon-Fri
[11] =>
[12] => Fri
[hours] => 00:00-06:59,
[13] => 00:00-06:59,
[14] => 06:59,
[15] => 06:59
)

Mon-Fri


MATCH
Array
(
[0] => Sat|00:00-09:29,13:00-18:29,22:00-23:59,
[1] =>
[dst] =>
[2] =>
[3] =>
[4] =>
[5] =>
[days] =>
[6] =>
[7] =>
[8] =>
[9] => Sat|
[daysweek] => Sat
[10] => Sat
[11] =>
[12] => Sat
[hours] => 00:00-09:29,13:00-18:29,22:00-23:59,
[13] => 00:00-09:29,13:00-18:29,22:00-23:59,
[14] => 23:59,
[15] => 23:59
)

Sat <- FOUND A WEEKDAY
H 00:00-09:29
00:00-09:29 ---->Sat 2019-08-10 00:00:00 UTC - Sat 2019-08-10 09:29:59 UTC ? Sat 2019-08-10 22:10:08 UTC
H 13:00-18:29
13:00-18:29 ---->Sat 2019-08-10 13:00:00 UTC - Sat 2019-08-10 18:29:59 UTC ? Sat 2019-08-10 22:10:08 UTC
H 22:00-23:59
> 22:00-23:59 ---->Sat 2019-08-10 22:00:00 UTC - Sat 2019-08-10 23:59:59 UTC ? Sat 2019-08-10 22:10:08 UTC <- FOUND A HOUR1 (is one hour behind GMT Lisbon time/British time)


MATCH
Array
(
[0] => Sun|00:00-23:59
[1] =>
[dst] =>
[2] =>
[3] =>
[4] =>
[5] =>
[days] =>
[6] =>
[7] =>
[8] =>
[9] => Sun|
[daysweek] => Sun
[10] => Sun
[11] =>
[12] => Sun
[hours] => 00:00-23:59
[13] => 00:00-23:59
[14] => 23:59
[15] => 23:59
)

Sun


MATCH
Array
(
[0] =>
[1] =>
[dst] =>
[2] =>
[3] =>
[4] =>
[5] =>
[days] =>
[6] =>
[7] =>
[8] =>
[9] =>
[daysweek] =>
[10] =>
[11] =>
[12] =>
[hours] =>
[13] =>
)

A bit of assistance would be apreciated.

You must specify winter / summer on every additions (after the ,).
Make sure your timezone is correctly set in emoncms user definitions before saving the schedule.
This is what i use in PT bi-schedule weekly:

Bi Weekly Empty -> Winter|Mon-Fri|00:00-06:59, Winter|Sat|00:00-09:29,13:00-18:29,22:00-23:59, Winter|Sun|00:00-23:59 , Summer|Mon-Fri|00:00-06:59, Summer|Sat|00:00-08:59,14:00-19:59,22:00-23:59, Summer|Sun|00:00-23:59

Bi Weekly Full -> Winter|Mon-Fri|07:00-23:59, Winter|Sat|09:30-12:59,18:30-21:59 , Summer|Mon-Fri|07:00-23:59, Summer|Sat|09:00-13:59,20:00-21:59|

Yes i was trying things arround and testing i had done that

"Make sure your timezone is correctly set in emoncms user definitions before saving the schedule."
Exactly i ended up figuring it out as i was playing arround. Rule is:

Schedules MUST be set After timezones are applied correctly. As the timezone in which schedule is created is persistent.

In other words, if schedule is made on GMT +0 time, then timezone is changed to GMT+1, schedules wont update.

Deleted them all and recreated them and now all seems to be working ok.

Thank you for your help!

By the way i followed your guide! Thank you for that!