, a code gallery for creating, saving and sharing all kinds of code snippets.

Snippets Tagged "time" 2 results found

Redirect with a Timer Javascript 1188
Author: Rene Posted On: Saturday, April 25, 2015

You can use JavaScript window.location to redirect a visitor to a required page. You may have seen this feature used by sites with full page ads, or to redirect visitors to the site's new domain name. You can also add a timer to the script that will allow the page to redirect automatically after x seconds.

Adjust Server Time PHP 1193
Author: rpjs Posted On: Saturday, May 17, 2014

Sometimes the time set on your server isn't accurate to what your local time is. If you can't change it, you can adjust it yourself. If your server thought it was 12 midnight, but it was really 7 pm, this will roll the $today variable back five hours to be correct.