How to check date and time of server from cPanel?

Posted by Sakshita

Check Date and Time of Server from cPanel

cPanel is the management tool of all the websites hosted within a server. It allows user to manage multiple task related to websites and its data. I've written multiple article related to management of website from cPanel. 
Today, I've selected the topic how to check date and time of server from cPanel. In this article, you will came to know about the procedure with which you can check the server date and time from cPanel.
Let us learn about the steps in detail.
  • Login to your cPanel account of server you want to check date and time.
  • Get inside File Manager section.
  • Get inside the domain directory and create .php file.

  • Now, copy and paste the below given code in the file.

<?php 
    date_default_timezone_set('Asia/Kolkata'); 
    $timestamp = time(); 
    $date_time = date("d-m-Y (D) H:i:s", $timestamp); 
    echo "Current Date & Time Of The Server Is: $date_time". "<br>"; 
    echo "The time is " . date("h:i:sa"); 
    ?> 

  • Click over Save Changes to save the file.
  • Now, run the file in the browser as domain.com/test.php.
The browser will show the output as given in the above image.

Hope this may help you to learn about the procedure to check date and time of the server. 
To learn more about web hosting and related queries, visit the blog at www.blog.redserverhost.com.

Cheap Web Hosting Services                             Web Hosting Services for Startup

Comments