Server time on login page

Version 1.49

Feature
Finished

The bottom of the login page for DA will now show the server's time (using the ctime function) This will be useful to debug cases where the license shows as expired or not active yet, but also to help debug session cookie expiry issues. Javascript has also been added to the this which checks the server's time() in seconds to the client's Date.now()/1000 value. If the difference is greater than 24 hours (session_cookie_multiplier * 60 * session_minutes), then a note will appear in bold red at the bottom of the page, for example: Computer or server time out of sync by 36.5 hours. For anyone with custom login pages, their login.html now has these extra tokens: TIME=Sat Aug 8 10:19:56 2015 TIME_SECONDS=1439050796 ALLOWED_OFFSET=86400 ------------------------ SKINS optional for customized, only if you want this functionality with your custom login page: login.html <div id=footer>|TIME|</footer> <script language="JavaScript"> computer_time=Math.floor(Date.now()/1000); server_time=|TIME_SECONDS|; time_diff=Math.abs(computer_time-server_time); if (time_diff>|ALLOWED_OFFSET|) { document.getElementById('outofsync').innerHTML='Computer or server time out of sync by '+(Math.round(100*time_diff/3600)/100)+' hours.'; } </script>

Interested to try DirectAdmin? Get a 30-day Free Trial!