Skip to content

High performance self-hosted photo and video management solution.

fix(web): convert shared link expiry to UTC before serialising (#28135)

Timonf9b7ce94077b
diff --git a/web/src/lib/components/SharedLinkExpiration.svelte b/web/src/lib/components/SharedLinkExpiration.svelte
index bfe1241482..25ee96242a 100644
--- a/web/src/lib/components/SharedLinkExpiration.svelte
+++ b/web/src/lib/components/SharedLinkExpiration.svelte
@@ -35,7 +35,7 @@
const setSelectedDate = (value: DateTime | undefined) => {
selectedPresetValue = null; // Clear preset when manually setting date
- expiresAt = value ? value.toISO() : null;
+ expiresAt = value ? value.toUTC().toISO() : null;
};
const selectPreset = (value: number) => {
@@ -44,8 +44,8 @@
expiresAt = null;
return;
}
- const newDate = DateTime.now().plus(value);
- expiresAt = newDate.toISO();
+ const newDate = DateTime.now().plus({ milliseconds: value });
+ expiresAt = newDate.toUTC().toISO();
};
const isSelected = (value: number) => {