Time offset

Started by vijay bhaskar, March 03, 2009, 07:23:52 AM

Previous topic - Next topic

vijay bhaskar

Hi,
registerd users can set timeoffset, but its rounded when user clicks on autodetect and not showing exact timeoffset. If u want to show exact timeoffset. use the following code.
In default theme go to profile.template.php
Replace the following code
var diff = Math.round((localTime.getTime() - serverTime.getTime())/3600000);

with.

var diff = (localTime.getTime() - serverTime.getTime())/3600000;
         diff=diff.toString();
         diff=diff.substring(0,6);
         diff=parseFloat(diff);


Now this will show exact timeoffset..

Advertisement: