[ZBX-7433] time_shift in trigger functions doesn't support DST Created: 2013 Nov 25 Updated: 2017 May 30 |
|
Status: | Open |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.0.9 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Strahinja Kustudic | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 0 |
Labels: | timeshift, timezone | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
time_shift parameter in trigger functions doesn't support time zones, so if you have a trigger expression with a time_shit parameter longer than a day, this can be a problem. Here is an example: sum(3600)-sum(3600,604800) This trigger checks the absolute difference of the sum in the last hour and the sum of that same hour 7 days ago (3600*24*7=604800), so if the time zone changes during that week, the sum(3600,604800) will either use one hour earlier or later than the current hour. |
Comments |
Comment by richlv [ 2013 Nov 25 ] |
just a note - timezones aren't really involved, daylight saving time is the culprit here |
Comment by Strahinja Kustudic [ 2013 Nov 25 ] |
Yeah DST is the problem, I was too tired when I wrote this. Thanks for the changes |
Comment by Glebs Ivanovskis (Inactive) [ 2016 Mar 10 ] |
Just a note. Sometimes you need to compare current values, say at 3p.m., with values at the same time, same 3p.m., yesterday. You don't want not taking DST into account to make you compare values from 3p.m. today and from 2 p.m. or 4.p.m. yesterday. But sometimes you need to compare values from the last period of time, say one hour, with values from the period before last, pre-last hour. You don't want taking DST into account to make it last hour and pre-pre-last hour or last hour and last hour. This should be considered as well. |