Skip to content

High performance self-hosted photo and video management solution.

fix(server): fallback to local timezone when rendering storage template (#4317)

Jason Rasmussen818005fcb5ca
diff --git a/server/src/domain/storage-template/storage-template.service.ts b/server/src/domain/storage-template/storage-template.service.ts
index f6265c972e..3ab9694c37 100644
--- a/server/src/domain/storage-template/storage-template.service.ts
+++ b/server/src/domain/storage-template/storage-template.service.ts
@@ -235,7 +235,9 @@ export class StorageTemplateService {
filetypefull: asset.type == AssetType.IMAGE ? 'IMAGE' : 'VIDEO',
};
- const dt = luxon.DateTime.fromJSDate(asset.fileCreatedAt, { zone: asset.exifInfo?.timeZone || undefined });
+ const systemTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
+ const zone = asset.exifInfo?.timeZone || systemTimeZone;
+ const dt = luxon.DateTime.fromJSDate(asset.fileCreatedAt, { zone });
const dateTokens = [
...supportedYearTokens,