mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 17:24:56 +03:00
fix: local offset hours (#21147)
This commit is contained in:
@@ -277,7 +277,7 @@ with
|
|||||||
epoch
|
epoch
|
||||||
from
|
from
|
||||||
(
|
(
|
||||||
asset."localDateTime" - asset."fileCreatedAt" at time zone 'UTC'
|
asset."localDateTime" AT TIME ZONE 'UTC' - asset."fileCreatedAt" at time zone 'UTC'
|
||||||
)
|
)
|
||||||
)::real / 3600 as "localOffsetHours",
|
)::real / 3600 as "localOffsetHours",
|
||||||
"asset"."ownerId",
|
"asset"."ownerId",
|
||||||
|
|||||||
@@ -566,7 +566,7 @@ export class AssetRepository {
|
|||||||
sql`asset.type = 'IMAGE'`.as('isImage'),
|
sql`asset.type = 'IMAGE'`.as('isImage'),
|
||||||
sql`asset."deletedAt" is not null`.as('isTrashed'),
|
sql`asset."deletedAt" is not null`.as('isTrashed'),
|
||||||
'asset.livePhotoVideoId',
|
'asset.livePhotoVideoId',
|
||||||
sql`extract(epoch from (asset."localDateTime" - asset."fileCreatedAt" at time zone 'UTC'))::real / 3600`.as(
|
sql`extract(epoch from (asset."localDateTime" AT TIME ZONE 'UTC' - asset."fileCreatedAt" at time zone 'UTC'))::real / 3600`.as(
|
||||||
'localOffsetHours',
|
'localOffsetHours',
|
||||||
),
|
),
|
||||||
'asset.ownerId',
|
'asset.ownerId',
|
||||||
|
|||||||
Reference in New Issue
Block a user