diff --git a/src/flextype/Foundation/Entries/Fields/CreatedAtField.php b/src/flextype/Foundation/Entries/Fields/CreatedAtField.php index 6fcadc04..92ea606c 100644 --- a/src/flextype/Foundation/Entries/Fields/CreatedAtField.php +++ b/src/flextype/Foundation/Entries/Fields/CreatedAtField.php @@ -7,13 +7,12 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -use Flextype\Component\Filesystem\Filesystem; use Atomastic\Strings\Strings; if (flextype('registry')->get('flextype.settings.entries.fields.created_at.enabled')) { flextype('emitter')->addListener('onEntryAfterInitialized', static function (): void { if (flextype('entries')->getStorage('fetch_single.data.created_at') == null) { - flextype('entries')->setStorage('fetch_single.data.created_at', (int) Filesystem::getTimestamp(flextype('entries')->getFileLocation(flextype('entries')->getStorage('fetch_single.id')))); + flextype('entries')->setStorage('fetch_single.data.created_at', (int) flextype('filesystem')->file(flextype('entries')->getFileLocation(flextype('entries')->getStorage('fetch_single.id')))->lastModified()); } else { flextype('entries')->setStorage('fetch_single.data.created_at', (int) strtotime(flextype('entries')->getStorage('fetch_single.data.created_at'))); }