Fix release date parsing to use UTC (#794)

This commit is contained in:
jeffvli 2024-10-15 03:15:59 -07:00
parent 3a63ee4b95
commit d3480a86c3
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ const normalizeSong = (
playlistItemId,
releaseDate: (item.releaseDate
? new Date(item.releaseDate)
: new Date(item.year, 0, 1)
: new Date(Date.UTC(item.year, 0, 1))
).toISOString(),
releaseYear: String(item.year),
serverId: server?.id || 'unknown',

View File

@ -207,7 +207,7 @@ const normalizeAlbum = (
name: item.name,
originalDate: null,
playCount: null,
releaseDate: item.year ? new Date(item.year, 0, 1).toISOString() : null,
releaseDate: item.year ? new Date(Date.UTC(item.year, 0, 1)).toISOString() : null,
releaseYear: item.year ? Number(item.year) : null,
serverId: server?.id || 'unknown',
serverType: ServerType.SUBSONIC,