Skip to content

Commit 088b900

Browse files
committed
represent the create/updated time of database record
1 parent 34b441d commit 088b900

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

app/code/Magento/MediaGallerySynchronization/Model/CreateAssetFromFile.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Magento\Framework\Filesystem;
1313
use Magento\Framework\Filesystem\Directory\ReadInterface;
1414
use Magento\Framework\Filesystem\Driver\File;
15-
use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
1615
use Magento\MediaGalleryApi\Api\Data\AssetInterface;
1716
use Magento\MediaGalleryApi\Api\Data\AssetInterfaceFactory;
1817
use Magento\MediaGalleryMetadataApi\Api\ExtractMetadataInterface;
@@ -24,11 +23,6 @@
2423
*/
2524
class CreateAssetFromFile
2625
{
27-
/**
28-
* Date format
29-
*/
30-
private const DATE_FORMAT = 'Y-m-d H:i:s';
31-
3226
/**
3327
* @var Filesystem
3428
*/
@@ -39,11 +33,6 @@ class CreateAssetFromFile
3933
*/
4034
private $driver;
4135

42-
/**
43-
* @var TimezoneInterface;
44-
*/
45-
private $date;
46-
4736
/**
4837
* @var AssetInterfaceFactory
4938
*/
@@ -67,7 +56,6 @@ class CreateAssetFromFile
6756
/**
6857
* @param Filesystem $filesystem
6958
* @param File $driver
70-
* @param TimezoneInterface $date
7159
* @param AssetInterfaceFactory $assetFactory
7260
* @param GetContentHashInterface $getContentHash
7361
* @param ExtractMetadataInterface $extractMetadata
@@ -76,15 +64,13 @@ class CreateAssetFromFile
7664
public function __construct(
7765
Filesystem $filesystem,
7866
File $driver,
79-
TimezoneInterface $date,
8067
AssetInterfaceFactory $assetFactory,
8168
GetContentHashInterface $getContentHash,
8269
ExtractMetadataInterface $extractMetadata,
8370
SplFileInfoFactory $splFileInfoFactory
8471
) {
8572
$this->filesystem = $filesystem;
8673
$this->driver = $driver;
87-
$this->date = $date;
8874
$this->assetFactory = $assetFactory;
8975
$this->getContentHash = $getContentHash;
9076
$this->extractMetadata = $extractMetadata;
@@ -112,8 +98,6 @@ public function execute(string $path): AssetInterface
11298
'path' => $path,
11399
'title' => $metadata->getTitle() ?: $file->getBasename('.' . $file->getExtension()),
114100
'description' => $metadata->getDescription(),
115-
'createdAt' => $this->date->date($file->getCTime())->format(self::DATE_FORMAT),
116-
'updatedAt' => $this->date->date($file->getMTime())->format(self::DATE_FORMAT),
117101
'width' => $width,
118102
'height' => $height,
119103
'hash' => $this->getHash($path),

app/code/Magento/MediaGalleryUi/Model/UpdateAsset.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ public function execute(int $id, MetadataInterface $data): void
8080
'path' => $asset->getPath(),
8181
'title' => $data->getTitle() ?? $asset->getTitle(),
8282
'description' => $data->getDescription() ?? $asset->getDescription(),
83-
'createdAt' => $asset->getCreatedAt(),
84-
'updatedAt' => $asset->getUpdatedAt(),
8583
'width' => $asset->getWidth(),
8684
'height' => $asset->getHeight(),
8785
'size' => $asset->getSize(),

0 commit comments

Comments
 (0)