Answer
By calling time() you can get the current system time as a UNIX timestamp (that is, measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)).
The usual time zone and minute length complications apply.
If you need to, you can format this into a string of text (will be understandable for humans using the Gregorian solar calendar) by calling date(...) with some useful parameters. For example:
date("r", time()) will return a string in RFC2822 format, as used by E-Mail, denoting the current system time.
date("c", time()) will return a string in ISO8601 format, as used by most database management systems for date display and input, denoting the current system time.
There are all kinds of extra formats, see <http://de3.php.net/manual/en/function.time.php>
First answer by ID3572582944. Last edit by ID3572582944. Question popularity: 15 [recommend question]




