Code: Select all
<script type="text/javascript">
var date = new Date();
var y=date.getFullYear();
var m=date.getMonth();
var d=date.getDay();
var h=date.getHours();
var min=date.getMinutes();
if (h<9)
{var d=d-1;
var rollover= new Date(y, m, d, 9,0,0,0);
}else (rollover= new Date(y, m, d, 9,0,0,0));
var now=new Date();
var timeelapsed=now-rollover;
Just finding the time difference (in milliseconds) between actual time and the rollover time (for me is 0900hrs).
If nothing is wrong here, then I'll have to check the rest of the code.

