First of all I am using
Mango Core: 3.5.6
Mango API: 3.5.2
Mango UI: 3.5.5
Platform: Centos 7.4.1708
Java Version: 1.8.0_161
Browser: Chrome 72.0.3626.121 (Official Build) (64-bit)
I am having a little bit of trouble getting some data points to behave properly.
I have a rain bucket logger that updates every 10 minutes. From the channel "P01 - Rain Gauge" I have created 3 more channels that check the past 3 hours, 24 hours and 72 hours. Our server is set to GMT and does not adjust for daylight savings time.
The 3 / 24/ 72 hour channels each use a simple script:
return p1.past(HOUR, 3).sum;
return p1.past(HOUR, 24).sum;
return p1.past(HOUR, 72).sum
where p1 is the variable set for the original channel
Here is a screen shot of the watchlist:
In this screen shot the original channel "P01 - Rain Gauge" is correct for the latest 10 minute interval.
The first problem I discovered is that the 3 / 24 / 72 hour channels were not picking up the latest reading. It seems that the update for these channel (triggered by the update of the original) happens just before the data is entered into the database. This is effectively making those readings 10 minutes behind.
I have tried putting in an "Execution Delay" in the update settings under the script section of the meta point but this has had no affect on the timings.
So I changed the 72 hour channel to use a cron pattern and update itself every 10 minutes and 30 seconds. The crom pattern was entered as: 30 0/10 * * * ?
Now the value is correct as it has picked up the latest reading from the original channel. But the time has picked up local time and not the server time.
So 2 issues I have encountered.
- The timing of updating the extrapolated data lags by probably milliseconds
- The appearance of local time when the server and loggers are set to GMT.
Any suggestions on how to solve these issues would be greatly appreciated.
p.s. the values for the 3 / 24 / and 72 hour readings should be the same in the screen shot as I have only been working on this for a couple of hours.
p.p.s. I have just checked the user time zone settings as well to see what affect they have on this issue. My user account is set to "Use server time zone" but if I change it to Etc/GMT which is the same time zone as the server is set to, the times on the watchlist reduce by an hour. This would make the 72 hour display correct but the other 3 channels show as an hour behind. So this is not a solution either.