mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 00:52:43 -05:00
fix(server): fallback to local timezone when rendering storage template (#4317)
This commit is contained in:
parent
e5f704cf3b
commit
818005fcb5
1 changed files with 3 additions and 1 deletions
|
@ -235,7 +235,9 @@ export class StorageTemplateService {
|
||||||
filetypefull: asset.type == AssetType.IMAGE ? 'IMAGE' : 'VIDEO',
|
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 = [
|
const dateTokens = [
|
||||||
...supportedYearTokens,
|
...supportedYearTokens,
|
||||||
|
|
Loading…
Add table
Reference in a new issue