Recent history: Difference between revisions

m
As Cumulus has been developed, more and more of these have been stored for Recent History. Those available in current version of CumulusMX release are listed at [[cumulusmx.db|RecentData table in cumulusmx.db]].
 
== Warning when Daylight Saving Time starts or ends ==
 
'''Please note that parameters specify time-stamped array element to retrieve based on counting back from current local time''' so the result for ''any period including when clocks change'' may not be quite what you anticipated.
 
=== Changing from Summer to Winter time ===
 
Remember, ''when clocks go back'', that for a whole hour following the clock change, clock times (now in winter time) repeat the previous clock times (that were in summer time). The way that Cumulus has coded this functionality, instead of the new sets of spot values being added after the old rows/elements, they overwrite the old table rows, or array elements, for the same times. Consequently, you cannot retrieve any values for the times that have been overwritten, and you must be careful when you specify to Cumulus which values you wish to retrieve.
 
=== Changing from Winter to Summer time ===
 
As for ''when the clocks go forward'', the new values do get added after the old rows/elements, but of course there will be one hour's worth of times that simply do not exist. Consequently, any attempt to retrieve values around the time of the clock change has to be careful not to specify any time in that non-existent period, as Cumulus will just return the value before, or the value after, depending on which is nearest.
 
=== Technical note ===
 
As explained earlier, you request an entry from Recent History by specifying 1 to 10 079 minutes ago. Cumulus looks at current clock time, calculates what time would be that long ago, and seeks the nearest datetime entry.
 
However, to do this would involve more complicated code, because MX would need to keep track of which row was last updated, keep track of when the clocks changed, and modify its search routine to find the correct row. Life is much easier if the Cumulus user makes allowance for any clock change when making their request.
 
 
=If the derivative you want is not available in your Cumulus release=