Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => SMF Feedback and Discussion => Topic started by: vijay bhaskar on March 03, 2009, 07:23:52 AM

Title: Time offset
Post by: vijay bhaskar 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..