How can I modify the PHP timezone setting for my website?

Modified on:
timezone php php timezone

Your server's Global time configuration cannot be changed, but you can use the PHP function date_default_timezone_set to set the timezone for your website. Here's an example code that sets and checks the currently set timezone:

<?php
date_default_timezone_set("Asia/Bangkok");
echo date_default_timezone_get();
?>

A list of available PHP timezones can be found here: http://www.php.net/manual/en/timezones.php

  • Unlimited Number of Websites
  • 24/7 Live Support
  • Easy Website Builder
  • 2X WordPress Optimized Speed
  • 30-Days Money-Back Guarantee
Grab the limited time deal!
¥ 469
00
/mo
¥3,597.00
¥1,407.00 for 3 months
Save 61%
Get started