diff --git a/server/src/infra/repositories/asset.repository.ts b/server/src/infra/repositories/asset.repository.ts index e2cfb28de..ec7e69aee 100644 --- a/server/src/infra/repositories/asset.repository.ts +++ b/server/src/infra/repositories/asset.repository.ts @@ -474,7 +474,7 @@ export class AssetRepository implements IAssetRepository { getByTimeBucket(timeBucket: string, options: TimeBucketOptions): Promise { const truncateValue = truncateMap[options.size]; return this.getBuilder(options) - .andWhere(`date_trunc('${truncateValue}', "localDateTime") = :timeBucket`, { timeBucket }) + .andWhere(`date_trunc('${truncateValue}', "fileCreatedAt") = :timeBucket`, { timeBucket }) .orderBy(`date_trunc('day', "localDateTime")`, 'DESC') .addOrderBy('asset.fileCreatedAt', 'DESC') .getMany(); diff --git a/server/test/assets b/server/test/assets new file mode 160000 index 000000000..9e6e1bcc2 --- /dev/null +++ b/server/test/assets @@ -0,0 +1 @@ +Subproject commit 9e6e1bcc245e0ae0285bb596faf310ead851fac6