From b5cde813a3d66f0dd7a3a95f9b1d4f16e6caf21f Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 23 Feb 2024 16:10:18 +0000 Subject: [PATCH] Cleanup of date calculation code --- project/src/generators/WeatherGenerator.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/project/src/generators/WeatherGenerator.ts b/project/src/generators/WeatherGenerator.ts index 499961a6..08b64b85 100644 --- a/project/src/generators/WeatherGenerator.ts +++ b/project/src/generators/WeatherGenerator.ts @@ -73,12 +73,10 @@ export class WeatherGenerator { // tarkov time = (real time * 7 % 24 hr) + 3 hour const russiaOffset = (this.timeUtil.getHoursAsSeconds(3)) * 1000; - const tarkovTime = new Date( + return new Date( (russiaOffset + (new Date().getTime() * this.weatherConfig.acceleration)) % (this.timeUtil.getHoursAsSeconds(24) * 1000), ); - - return new Date(tarkovTime); } /**