Skip to content

High performance self-hosted photo and video management solution.

fix: timezone issue in tests (#25937)

Dion de Koningcfc5ed5997a4
diff --git a/server/test/vitest.config.mjs b/server/test/vitest.config.mjs
index 6d9ee3a564..79d053d176 100644
--- a/server/test/vitest.config.mjs
+++ b/server/test/vitest.config.mjs
@@ -2,9 +2,6 @@ import swc from 'unplugin-swc';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
-// Set the timezone to UTC to avoid timezone issues during testing
-process.env.TZ = 'UTC';
-
export default defineConfig({
test: {
root: './',
@@ -25,6 +22,9 @@ export default defineConfig({
fallbackCJS: true,
},
},
+ env: {
+ TZ: 'UTC',
+ },
},
plugins: [swc.vite(), tsconfigPaths()],
});
diff --git a/web/vite.config.ts b/web/vite.config.ts
index 6a2f34cf55..69e1d7152f 100644
--- a/web/vite.config.ts
+++ b/web/vite.config.ts
@@ -63,5 +63,8 @@ export default defineConfig({
sequence: {
hooks: 'list',
},
+ env: {
+ TZ: 'UTC',
+ },
},
} as UserConfig);