hi, i have a web site in a server. this server has the time in GMT time zone. i want to display the time in GMT +2 hours. this is my PHP script for getting date and time. <?php print date("d/m/Y H:i:s")?> PHP: What i can do to get the "+2" hours?
You could try this... Open or create a .htaccess file and add the following line in it: SetEnv TZ Istanbul Code (markup): Istanbul is just a random country I selected, you could of course, select any GMT +2 country.
<?php $thetime = mktime(date("H")+2,date("i"),date("s"),date("m"),date("d"),date("Y")); echo date("d/m/Y H:i:s", $thetime); ?> PHP: