增加tools_time.php
This commit is contained in:
parent
70b34f3b2e
commit
471b7f2c15
18
tools_time.php
Normal file
18
tools_time.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
function get_localtime()
|
||||
{
|
||||
date_default_timezone_set('Asia/Shanghai');
|
||||
|
||||
return time();
|
||||
}
|
||||
|
||||
function time_mysql_format($timestamp)
|
||||
{
|
||||
return date("Y-m-d H:i:s",$timestamp);
|
||||
}
|
||||
|
||||
function localtime_mysql_format()
|
||||
{
|
||||
return time_mysql_format(get_localtime());
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user