How to Check Your PHP Timezone in cPanel Print

  • check php timezone cpanel, view timezone with php, cpanel timezone test script, php timezone script, how to check server time cpanel
  • 0

How to Check Your PHP Timezone in cPanel

If you're not sure which timezone your web hosting account is using, you can easily check it with a simple PHP script inside your cPanel account.

Step-by-Step Instructions

  1. Log in to your cPanel account.

  2. Open the File Manager.

  3. Navigate to your website’s root directory (usually public_html).

  4. Click + File and create a new file named:
    timecheck.php

  5. Edit the file and paste the following code:

    <?php
    echo 'Timezone: ' . date_default_timezone_get() . "<br>";
    echo 'Current time: ' . date("Y-m-d H:i:s");
    ?>
    
  6. Save the file, then open it in your browser by visiting:
    https://yourdomain.com/timecheck.php

  7. You’ll see your current PHP timezone and the server’s local time.

After checking, you can safely delete the timecheck.php file for security.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution