You can use date_default_timezone_set() to set default timezone for a given script. You can also edit the php.ini to change the timezone for all projects.
You can find list of supported timezones HERE for the above function
<?php //before use of date_default_timezone_set echo date("d-m-Y h:i:s A"); echo '<br /><br />'; //set to US central time date_default_timezone_set('US/Central'); echo date("d-m-Y h:i:s A"); ?>
Get Free Sinhala IT Learning Videos Kuppiya.com
Thanks
ReplyDelete@SLIIT MSc IS
Thanks alot! :)
ReplyDeleteThanks!
ReplyDelete