Skip to content

Instantly share code, notes, and snippets.

@jun66j5
Last active March 15, 2019 11:32
Show Gist options
  • Save jun66j5/b276af4bd53cc1a08a5b34861d21688f to your computer and use it in GitHub Desktop.
Save jun66j5/b276af4bd53cc1a08a5b34861d21688f to your computer and use it in GitHub Desktop.
Respect "stime" parameter of screen view in zabbix web
--- /usr/share/zabbix/include/classes/screens/CScreenGraph.php.orig 2019-03-15 20:21:20.892689484 +0900
+++ /usr/share/zabbix/include/classes/screens/CScreenGraph.php 2019-03-15 20:21:31.759473860 +0900
@@ -143,7 +143,7 @@
.'&graph3d='.$graph3d.$this->getProfileUrlParams();
$timeControlData['src'] .= ($this->mode == SCREEN_MODE_EDIT)
? '&period=3600&stime='.date(TIMESTAMP_FORMAT, time())
- : '&period='.$this->timeline['period'].'&stime='.$this->timeline['stimeNow'];
+ : '&period='.$this->timeline['period'].'&stime='.$this->timeline['stime'];
}
else {
if ($this->screenitem['dynamic'] == SCREEN_SIMPLE_ITEM || !$this->screenitem['url']) {
@@ -161,7 +161,7 @@
.'&height='.$this->screenitem['height'].'&legend='.$legend.$this->getProfileUrlParams();
$timeControlData['src'] .= ($this->mode == SCREEN_MODE_EDIT)
? '&period=3600&stime='.date(TIMESTAMP_FORMAT, time())
- : '&period='.$this->timeline['period'].'&stime='.$this->timeline['stimeNow'];
+ : '&period='.$this->timeline['period'].'&stime='.$this->timeline['stime'];
}
// output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment