From 3aa8dce713205f7c8f5014a78db41bde5fc97ac0 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 29 Nov 2026 08:26:34 +0100 Subject: [PATCH] Fix dates of manually entered market data in time zones other than UTC --- .../app/endpoints/market-data/market-data.controller.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/api/src/app/endpoints/market-data/market-data.controller.ts b/apps/api/src/app/endpoints/market-data/market-data.controller.ts index 5b877a2d6b..89c90fef8d 100644 --- a/apps/api/src/app/endpoints/market-data/market-data.controller.ts +++ b/apps/api/src/app/endpoints/market-data/market-data.controller.ts @@ -111,9 +111,10 @@ export class MarketDataController { }) ); - // Market data used to be stored in the time zone of the instance. Delete - // the items of the same dates that are not at midnight (UTC), so that they - // do not take precedence over the updated ones. + // Market data used to be stored at the given date in the time zone of the + // instance. Delete the items at exactly these times, unless they are at + // midnight (UTC), so that they do not take precedence over the items at + // midnight (UTC). Any other items are kept. const datesToDelete = data.marketData .map(({ date }) => { return parseISO(date);