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
-
Log in to your cPanel account.
-
Open the File Manager.
-
Navigate to your website’s root directory (usually
public_html
). -
Click + File and create a new file named:
timecheck.php
-
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"); ?>
-
Save the file, then open it in your browser by visiting:
https://yourdomain.com/timecheck.php
-
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.