On Screens, it is possible to add a clock (which is embedded as a flash movie).
When I designed a screen to show various information concerning a specific country, I wanted to be able to add a timezone offset to the time value shown on the clock.
This is basically possible because zbxclock.swf takes arguments like in this example:
When you use zbxclock.swf to display the server's time, it will be given the timestamp argument containing the PHP time()-value to start counting on.
I assume this is because the clock flash movie uses your system's clock ticks to count the seconds in the movie. So giving it the server-calculated time()-value as an offset, it will display the server's time plus every clocktick of your system.
So timestamp could be used as an offset value. But:
zbxclock.swf hasn't been designed to take an offset value.
It expects a timestamp argument. If it gets one, it'll say "SERVER".
So if one uses timestamp as only an offset to current local time, it thinks it should display "SERVER" as well.
So zbxclock.swf should be modified to understand an offset value like this (pseudocode):
So since I don't have the zbxclock.fla (and neither do I have Flash), could someone make the change?
Or am I making wrong presumptions? Lemme hear watcha think :
Oh, I forgot to mention: I wasn't sure about what STYLE_HORISONTAL and STYLE_VERTICAL in trunk/frontends/php/screenedit.php:53 did so I just commented them out.
When I designed a screen to show various information concerning a specific country, I wanted to be able to add a timezone offset to the time value shown on the clock.
This is basically possible because zbxclock.swf takes arguments like in this example:
zbxclock.swf?analog=1&smooth=1&url=screenedit.php%3Fform%3Dupdate%26screenid%3D6%26s creenitemid%3D24%23form×tamp=1194656674
When you use zbxclock.swf to display the server's time, it will be given the timestamp argument containing the PHP time()-value to start counting on.
I assume this is because the clock flash movie uses your system's clock ticks to count the seconds in the movie. So giving it the server-calculated time()-value as an offset, it will display the server's time plus every clocktick of your system.
So timestamp could be used as an offset value. But:
zbxclock.swf hasn't been designed to take an offset value.
It expects a timestamp argument. If it gets one, it'll say "SERVER".
So if one uses timestamp as only an offset to current local time, it thinks it should display "SERVER" as well.
So zbxclock.swf should be modified to understand an offset value like this (pseudocode):
IF offset <= 100000 // the maximum offset is at 14 hours=50400 seconds so just to make sure nothing goes wrong (daytime savings or something like that??), take 100000
THEN say "LOCAL"
ELSE say "SERVER"
FI
display time(offset) // display the time starting at offset, hence for 0, display 00h:00m:00s
THEN say "LOCAL"
ELSE say "SERVER"
FI
display time(offset) // display the time starting at offset, hence for 0, display 00h:00m:00s
So since I don't have the zbxclock.fla (and neither do I have Flash), could someone make the change?
Or am I making wrong presumptions? Lemme hear watcha think :
Oh, I forgot to mention: I wasn't sure about what STYLE_HORISONTAL and STYLE_VERTICAL in trunk/frontends/php/screenedit.php:53 did so I just commented them out.
Comment