how to get server date and time?

Answer Posted / raja

$timestamp = time();
$datum = date("Y-m-d (D) H:i:s",$timestamp);
echo "Current date and local time on this server is $datum
<br>\n";

Is This Answer Correct ?    14 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between print() and echo()?

581


How can I make a script that can be bilingual (supports english, german)?

592


How to convert a json string to an array in php?

557


How is it possible to set an infinite execution time for php script?

522


Does cors prevent csrf?

531






Why is facebook still using php?

577


How to get the number of characters in a string?

567


How do I know my xampp version?

518


What is symfony php?

528


How do you end php?

517


Can you specify the "new line" character in single-quoted strings?

548


Is it possible to destroy a cookie?

541


How to pad an array with the same value multiple times?

475


How to remove leading and trailing spaces from user input values in php?

546


What does $_ post mean in php?

596