Revision 58ed1013
Added by Seth Mos almost 15 years ago
usr/local/www/status_rrd_graph.php | ||
---|---|---|
227 | 227 |
break; |
228 | 228 |
} |
229 | 229 |
$start = mktime((8 + $houroffset), 0, 0, $curmonth, $curday, $curyear); |
230 |
if($offset == 0)
|
|
230 |
if(($offset != 0) || (($start + ($end - (12 * 3600)) ) > 0) ) {
|
|
231 | 231 |
$end = mktime((8 + $houroffset) + 12, 0, 0, $curmonth, $curday, $curyear); |
232 |
} |
|
232 | 233 |
break; |
233 | 234 |
case "day": |
234 | 235 |
$start = mktime(0, 0, 0, $curmonth, ($curday + $offset), $curyear); |
235 |
if($offset == 0)
|
|
236 |
if($offset != 0)
|
|
236 | 237 |
$end = mktime(0, 0, 0, $curmonth, (($curday + $offset) + 1), $curyear); |
237 | 238 |
break; |
238 | 239 |
case "week": |
... | ... | |
245 | 246 |
break; |
246 | 247 |
} |
247 | 248 |
$start = mktime(0, 0, 0, $curmonth, (($curday - $curweekday) + $weekoffset), $curyear); |
248 |
if($offset == 0)
|
|
249 |
if($offset != 0)
|
|
249 | 250 |
$end = mktime(0, 0, 0, $curmonth, (($curday - $curweekday) + $weekoffset + 7), $curyear); |
250 | 251 |
break; |
251 | 252 |
case "month": |
252 | 253 |
$start = mktime(0, 0, 0, ($curmonth + $offset), 0, $curyear); |
253 |
if($offset == 0)
|
|
254 |
if($offset != 0)
|
|
254 | 255 |
$end = mktime(0, 0, 0, (($curmonth + $offset) + 1), 0, $curyear); |
255 | 256 |
break; |
256 | 257 |
case "quarter": |
257 | 258 |
$start = mktime(0, 0, 0, (($curmonth - 2) + $offset), 0, $curyear); |
258 |
if($offset == 0)
|
|
259 |
if($offset != 0)
|
|
259 | 260 |
$end = mktime(0, 0, 0, (($curmonth + $offset) + 1), 0, $curyear); |
260 | 261 |
break; |
261 | 262 |
case "year": |
262 | 263 |
$start = mktime(0, 0, 0, 1, 0, ($curyear + $offset)); |
263 |
if($offset == 0)
|
|
264 |
if($offset != 0)
|
|
264 | 265 |
$end = mktime(0, 0, 0, 1, 0, (($curyear + $offset) +1)); |
265 | 266 |
break; |
266 | 267 |
case "4year": |
267 | 268 |
$start = mktime(0, 0, 0, 1, 0, (($curyear - 3) + $offset)); |
268 |
if($offset == 0)
|
|
269 |
if($offset != 0)
|
|
269 | 270 |
$end = mktime(0, 0, 0, 1, 0, (($curyear + $offset) +1)); |
270 | 271 |
break; |
271 | 272 |
} |
Also available in: Unified diff
Fix logic operator for graph endpoint