From c61a415fb2c40e96622aae81be84197ab191e6e2 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:12:42 +0200 Subject: [PATCH] Bugfix/change date to utc in data gathering service (#867) * Change date to UTC * Update changelog --- CHANGELOG.md | 6 ++++++ apps/api/src/services/data-gathering.service.ts | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 494fb223..fec9b353 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Changed the date to UTC in the data gathering service + ## 1.141.1 - 24.04.2022 ### Added diff --git a/apps/api/src/services/data-gathering.service.ts b/apps/api/src/services/data-gathering.service.ts index c3a7f64c..d878b014 100644 --- a/apps/api/src/services/data-gathering.service.ts +++ b/apps/api/src/services/data-gathering.service.ts @@ -377,7 +377,14 @@ export class DataGatheringService { data: { dataSource, symbol, - date: currentDate, + date: new Date( + Date.UTC( + getYear(currentDate), + getMonth(currentDate), + getDate(currentDate), + 0 + ) + ), marketPrice: lastMarketPrice } });