Advertisement:

Author Topic: Time offset  (Read 1081 times)

Offline vijay bhaskar

  • Semi-Newbie
  • *
  • Posts: 31
    • Informatica, Oracle, Netezza, Unix Tutorials
Time offset
« on: March 03, 2009, 07:23:52 AM »
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..
« Last Edit: March 03, 2009, 07:29:46 AM by vijay bhaskar »