[pve-devel] r6026 - pve-manager/pve2/www/new/node
svn-commits at proxmox.com
svn-commits at proxmox.com
Fri May 27 11:00:43 CEST 2011
Author: dietmar
Date: 2011-05-27 11:00:42 +0200 (Fri, 27 May 2011)
New Revision: 6026
Modified:
pve-manager/pve2/www/new/node/TimeView.js
Log:
cleanup
Modified: pve-manager/pve2/www/new/node/TimeView.js
===================================================================
--- pve-manager/pve2/www/new/node/TimeView.js 2011-05-27 04:56:54 UTC (rev 6025)
+++ pve-manager/pve2/www/new/node/TimeView.js 2011-05-27 09:00:42 UTC (rev 6026)
@@ -9,9 +9,9 @@
if (!nodename)
throw "no node name specified";
- var rendertime = function(value) {
- var now = new Date();
- var servertime = new Date(value * 1000 + now.getTimezoneOffset()*60000);
+ var tzoffset = (new Date()).getTimezoneOffset()*60000;
+ var renderlocaltime = function(value) {
+ var servertime = new Date((value * 1000) + tzoffset);
return Ext.Date.format(servertime, 'Y-m-d H:i:s');
};
@@ -27,8 +27,15 @@
cwidth1: 150,
interval: 1000,
rows: {
- timezone: { header: 'Time zone', required: true, },
- localtime: { header: 'Server time', required: true, renderer: rendertime }
+ timezone: {
+ header: 'Time zone',
+ required: true,
+ },
+ localtime: {
+ header: 'Server time',
+ required: true,
+ renderer: renderlocaltime
+ }
},
tbar: [
{
More information about the pve-devel
mailing list