How to know date and time of my cPanel based server via PHP?

Hello Friends!!!

How to know Date and Time of my server from cPanel? [Important| Revised 2019]

So here in this blog i am going to tell you a php code which will help you to know date and time of your server from cpanel

Easy steps to check the Date & Time of my cPanel based server [Updated May 2019]

step::1 Login to your cPanel

step::2 Open File Manager section

How to know Date and Time of my server from cPanel
How to know Date and Time of my server from cPanel

step::3 Go inside Public_html and Create a .php file

step::4 Now after right click on the file to edit

step::5 Now just place the below php code

<?php

echo “Today is ” . date(“Y/m/d”) . “<br>”;

date_default_timezone_set(“America/New_York”);

echo “The time is ” . date(“h:i:sa”);

?>

If you are from India just replace America/New_York with Asia/Kolkata

How to know Date and Time of my server from cPanel
How to know Date and Time of my server from cPanel

step::6 Click on Save


Now run this file from new tab and get the result

How to know Date and Time of my server from cPanel
How to know Date and Time of my server from cPanel

Hope this helps you!!!

Thanks for Reading!!!!