refactor: use epoch timestamp
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -15,6 +15,7 @@ use KTXF\Resource\Identifier\CollectionIdentifierInterface;
|
||||
use KTXF\Resource\Identifier\EntityIdentifierInterface;
|
||||
use KTXF\Resource\Identifier\ResourceIdentifier;
|
||||
use KTXF\Resource\Identifier\ServiceIdentifier;
|
||||
use KTXF\Utile\Timestamp;
|
||||
|
||||
/**
|
||||
* Abstract Node Base Class
|
||||
@@ -119,18 +120,14 @@ abstract class NodeBaseAbstract implements NodeBaseInterface {
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function created(): DateTimeImmutable|null {
|
||||
return isset($this->data[static::PROPERTY_CREATED])
|
||||
? new DateTimeImmutable($this->data[static::PROPERTY_CREATED])
|
||||
: null;
|
||||
return Timestamp::toDateTime($this->data[static::PROPERTY_CREATED] ?? null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function modified(): DateTimeImmutable|null {
|
||||
return isset($this->data[static::PROPERTY_MODIFIED])
|
||||
? new DateTimeImmutable($this->data[static::PROPERTY_MODIFIED])
|
||||
: null;
|
||||
return Timestamp::toDateTime($this->data[static::PROPERTY_MODIFIED] ?? null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user