mirror of
https://github.com/samsonjs/immich.git
synced 2026-03-25 09:15:56 +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 { 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()],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -63,5 +63,8 @@ export default defineConfig({
|
|||
sequence: {
|
||||
hooks: 'list',
|
||||
},
|
||||
env: {
|
||||
TZ: 'UTC',
|
||||
},
|
||||
},
|
||||
} as UserConfig);
|
||||
|
|
|
|||
Loading…
Reference in a new issue