On Thu, 10 Jan 2008 23:11:34 +0000
"rkirkley" <[EMAIL PROTECTED]> wrote:
> Yes, I have seen this problem too. The time display error is only in the gui
> on the top right, I don't see this bad time anywhere else in the program.
>
> Tests run from the linux box:
> [code]
>
> Python 2.4.4 (#1, Jan 10 2008, 11:56:16)
> [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import time
> >>> time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))
> '2008-01-10 15:04:28'
> >>>
>
>
> [EMAIL PROTECTED] ~]# date
> Thu Jan 10 15:04:31 PST 2008
> [/code]
>
> As seen above, python time matches unix time stamp. But the gui 'Zenoss
> server time' is:
>
> 21:04:55
>
> That is 6 hours ahead of the server time. I am viewing in a firefox browser
> on a pc that is in EST. The server is in PST.
>
> Any ideas?
>
Same here.
Box is somewhere in USA, but it has been changed to UTC.
- The suggested test in python show the right UTC time.
- The time shown is, in my case, 2 hours too slow compared to UTC.
- It is not related to my timezone at all ( I am on GMT+10 DST at the moment).
- It shows the same value from 2 computers on my same LAN, FBSD + ffox, and
WinXP + IE7.
I think the problem is in the JS code on the page itself. The way it works is ,
when u load the page, the server injects into the JS code the current server
time. This value is correct in my test ( I did a refresh, and checked the time
- it matches the server time in UTC). But then, something happens with the
handy dandy JS and it goes to pieces....
eg:
<div id="system_clock_container">Zenoss server time:
<span id="system_clock">Now o'clock</span>
<script> var start_time = '2008-01-13 14:28:03';</script> <!-- THIS TIME IS
CORRECT! -->
<script>
var timedelta = new Date().getTime() - isoTimestamp(start_time).getTime();
var isIE//@cc_on=1;
if (isIE) timedelta -= 25000;
function updateTime(){
var servernow = new Date(new Date().getTime() + timedelta);
$('system_clock').innerHTML = toISOTime(servernow);
callLater(1, updateTime);
}
addLoadEvent(updateTime);
</script>
</div>
The JS depends on MochiKit.js bundled with Zenoss....
sorry folks, it is too late for me now to even suggest to my lame brain to
remember any JS it ever knew to try to dig this one out...
Hopefully someone more able can figure it out?
cheers!
B
_________________________
{Beto|Norberto|Numard} Meijome
"Software is like sex, its better when its free"
Linus Torvalds
I speak for myself, not my employer. Contents may be hot. Slippery when wet.
Reading disclaimers makes you go blind. Writing them is worse. You have been
Warned.
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users