Signer Timezone Configuration

In order for Signer to correctly convert date values to the user’s configured timezone, the timezone settings for your MySQL server and PHP must be identical.

Signer will automatically detect when the two are not identical and display a warning message on your dashboard (if you are a superadmin user).

To avoid this warning message you must either:

  • change your MySQL timezone, or
  • change your PHP timezone.

Please note that the actual timezone you use does not matter. Signer will always convert the date/time values displayed to users based on their Signer user settings. The only requirement is that your MySQL and PHP clock settings are synchronized.

Please consult your web host’s support knowledgebase area regarding customizing the PHP configuration. The process varies however most hosting companies should have documentation explaining how it can be done.

There are a number of options available depending on your hosting platform. Typically they include:

  • cPanel MultiPHP INI editor
  • custom .htaccess file
  • custom php.ini file

Option 1: Set using your cPanel MultiPHP INI editor

This is the best option if your host provides it. This option will use a number of different methods, including the options listed below to set your PHP timezone.

  1. In your cPanel, locate the cPanel MultiPHP INI Editor icon.
  2. Select “Editor” mode
  3. Select your Signer domain name
  4. Enter your setting as follows
    date.timezone = "<time_zone>"
    where <time_zone> is a supported PHP timezone setting and is the timezone that is used by your MySQL configuration. For a list of supported PHP timezones, please refer to https://www.php.net/manual/en/timezones.php.
    For example:
    date.timezone = "Australia/Sydney"
  5. Click Save

Option 2: Set the PHP timezone in your .htaccess file

One option may be to set your PHP timezone in the .htaccess file so that it matches your MySQL server.

To make the change, simply load the .htaccess file located in the folder where Signer is installed and add the line:

php_value date.timezone '<time_zone>'

Where <time_zone> is a supported PHP timezone setting and is the timezone that is used by your MySQL configuration. For a list of supported PHP timezones, please refer to https://www.php.net/manual/en/timezones.php.

For example, if your MySQL timezone was Australia/Sydney and you wanted your PHP timezone to match, your .htaccess will appear as:

php_value date.timezone 'Australia/Sydney'

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On
    
    # Redirect to HTTPS
    #RewriteCond %{HTTPS} !on
    #RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    # Redirect Trailing Slashes If Not A Folder...
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond $1 !^(cron\.php)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

# Deny access to the .env file
<Files ".env">
    Require all denied
</Files>

Option 3: Set the PHP timezone in your php.ini file

One option may be to set your PHP timezone in the php.ini file so that it matches your MySQL server.

To make the change, simply load the php.ini file located in the folder where Signer is installed (or create one if it doesn’t exist) and add the line:

date.timezone = "<time_zone>"

Where <time_zone> is a supported PHP timezone setting and is the timezone that is used by your MySQL configuration. For a list of supported PHP timezones, please refer to https://www.php.net/manual/en/timezones.php.

For example, if your MySQL timezone was Australia/Sydney and you wanted your PHP timezone to match, your php.ini would contain:

date.timezone = "Australia/Sydney"
What's your reaction?
0COOL0WTF0LOVE0LOL