mirror of
https://github.com/immich-app/immich.git
synced 2025-12-05 20:40:29 -08:00
fix: local offset hours (#21147)
This commit is contained in:
@@ -277,7 +277,7 @@ with
|
||||
epoch
|
||||
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",
|
||||
"asset"."ownerId",
|
||||
|
||||
@@ -566,7 +566,7 @@ export class AssetRepository {
|
||||
sql`asset.type = 'IMAGE'`.as('isImage'),
|
||||
sql`asset."deletedAt" is not null`.as('isTrashed'),
|
||||
'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',
|
||||
),
|
||||
'asset.ownerId',
|
||||
|
||||
Reference in New Issue
Block a user