Add Temporal::MYSQL constant

This commit is contained in:
Hypolite Petovan 2018-01-25 22:00:29 -05:00
parent b24690e8df
commit 6d23de1bdb
8 changed files with 24 additions and 20 deletions

View file

@ -1,5 +1,6 @@
<?php
use Friendica\Util\Temporal;
define("DAV_ACL_READ", "{DAV:}read");
define("DAV_ACL_WRITE", "{DAV:}write");
@ -150,7 +151,7 @@ function vcard_source_compile($vcardsource)
*/
function wdcal_php2MySqlTime($phpDate)
{
return date("Y-m-d H:i:s", $phpDate);
return date(Temporal::MYSQL, $phpDate);
}
/**
@ -159,7 +160,7 @@ function wdcal_php2MySqlTime($phpDate)
*/
function wdcal_mySql2PhpTime($sqlDate)
{
$ts = DateTime::createFromFormat("Y-m-d H:i:s", $sqlDate);
$ts = DateTime::createFromFormat(Temporal::MYSQL, $sqlDate);
return $ts->format("U");
}