<?php
$time_now = time(); // Current GMT timestamp Integer
$format = 'Y-m-d @ H:i:s'; // One usual europe format, including seconds
$string_to_display = date( $format, $time_now );
echo $string_to_display;
?>
Regarding storing time in database,
most of us prefer to store $time_now value ( timestamp in INTEGER form ).
this will make time value portable and neutral,
as GMT Time is the base for [man]time/man
Then when we want to show time
we can format to string
using any locale format and timezone offset string.
Using [man]date/man
regars ..to you 🙂
from ..halojoy