This topic contains 1 reply, has 2 voices, and was last updated by  Mark Brown 1 year ago.

  • Author
    Posts
  • #1383
     Tommie Macklin 
    Participant

    By default, servers are set to use the Central European Time zone. I am in a different time zone, and need my PHP application to have that.

  • #1384
     Mark Brown 
    Participant

    To set the time zone, follow these steps:

    – Log in to your account using cPanel.
    – Use a text editor to add the following line to the .htaccess file. Replace Region/Zone with your own time zone:

    php_value date.timezone 'Region/Zone'

    – Save the changes to the .htaccess file and exit the text editor.
    – To verify that the new setting is active, create a PHP test file that contains the following code in the same directory where the .htaccess file is located:

    <?php phpinfo(); ?>

    – Load the test file in your web browser, and then search for the name of the directive. The Local Value column should display the new setting that you specified in the .htaccess file.

    For a complete list of supported time zones in PHP, please visit http://www.php.net/manual/en/timezones.php

You must be logged in to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending
TD Web Services

 COPYRIGHT OF TD WEB SERVICES © 2017. ALL RIGHTS RESERVED.

or

Log in with your credentials

or    

Forgot your details?

or

Create Account