php timestamp

巴扎黑
Release: 2016-11-21 14:28:09
Original
1501 people have browsed it

UNIX timestamp

date Format a local time and date

time() returns the current UNIX timestamp

microtime returns the current UNIX timestamp and microseconds

localtime gets the local time

date_default_timezone_get (time zone) Get the default time zone used by all date and time functions in a script

date_default_timezone_set Set the default time zone used by all date and time functions in a script

date_sunrise Returns the sunrise time for the given date and location

date_sunset returns The sunset time of a given date and location

getdate gets the date and time information

liezi

The above methods are all

  <?php
date_default_timezone_get(时区);
echo date("Y-m-d",time());
 
?>
Copy after login


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template