Search notes:

PHP date and time related code snippets

time()

time() returns the Unix time, that is: the amount of seconds that has passed since January 1st, 1970, in UTC time.
<?php
header("Content-Type: text/plain");
printf("time() = %d", time());
?>
Github repository about-php, path: /date-time/time.php

See also

Other PHP snippets

Index