mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-10 10:28:50 +00:00
Add Temporal::MYSQL constant
This commit is contained in:
parent
b24690e8df
commit
6d23de1bdb
8 changed files with 24 additions and 20 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue