refactor: use epoch time stamp

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-07-04 18:26:53 -04:00
parent 4b4e7a3ae0
commit b375204acc
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -11,6 +11,7 @@ namespace KTXM\ProviderLocalChrono\Providers\Personal;
use KTXF\Chrono\Entity\EntityMutableAbstract;
use KTXF\Chrono\Event\EventObject;
use KTXF\Utile\Timestamp;
class EntityResource extends EntityMutableAbstract {
@@ -49,8 +50,8 @@ class EntityResource extends EntityMutableAbstract {
'uid' => $this->userId,
'cid' => $this->collection(),
'eid' => $this->identifier(),
'createdOn' => $this->data[self::PROPERTY_CREATED] ?? date('c'),
'modifiedOn' => date('c'),
'createdOn' => Timestamp::normalize($this->data[self::PROPERTY_CREATED] ?? null),
'modifiedOn' => Timestamp::normalize($this->data[self::PROPERTY_MODIFIED] ?? null),
], static fn($value) => $value !== null);
$document = array_merge($document, $this->getProperties()->toStore());