mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
fix: timezone issue in tests (#25937)
* Fixed an issue where time tests fail in some timezones * Revert previous fix and add TZ env variable to fix the issue * Revert other changes and align TZ fix between server and web * Revert package lock file --------- Co-authored-by: Dion de Koning <dion@DionK01.local>
This commit is contained in:
parent
1b3c0e4f65
commit
cfc5ed5997
2 changed files with 6 additions and 3 deletions
|
|
@ -2,9 +2,6 @@ import swc from 'unplugin-swc';
|
||||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||||
import { defineConfig } from 'vitest/config';
|
import { defineConfig } from 'vitest/config';
|
||||||
|
|
||||||
// Set the timezone to UTC to avoid timezone issues during testing
|
|
||||||
process.env.TZ = 'UTC';
|
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
test: {
|
test: {
|
||||||
root: './',
|
root: './',
|
||||||
|
|
@ -25,6 +22,9 @@ export default defineConfig({
|
||||||
fallbackCJS: true,
|
fallbackCJS: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
env: {
|
||||||
|
TZ: 'UTC',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
plugins: [swc.vite(), tsconfigPaths()],
|
plugins: [swc.vite(), tsconfigPaths()],
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -63,5 +63,8 @@ export default defineConfig({
|
||||||
sequence: {
|
sequence: {
|
||||||
hooks: 'list',
|
hooks: 'list',
|
||||||
},
|
},
|
||||||
|
env: {
|
||||||
|
TZ: 'UTC',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
} as UserConfig);
|
} as UserConfig);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue