mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Enable ztime() function to process Unix timestamps
This commit is contained in:
parent
4ee115e4f3
commit
8ad6f40abd
1 changed files with 5 additions and 0 deletions
|
|
@ -520,6 +520,11 @@ function ztime($str)
|
|||
{
|
||||
return null;
|
||||
}
|
||||
if (strlen($str) === 9 || (strlen($str) === 10 && $str <= 2147483647))
|
||||
{
|
||||
return intval($str);
|
||||
}
|
||||
|
||||
$year = (int)substr($str, 0, 4);
|
||||
$month = (int)substr($str, 4, 2) ?: 1;
|
||||
$day = (int)substr($str, 6, 2) ?: 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue