From 24f2c9990eddc1613ccde4af6203b4770fe78e98 Mon Sep 17 00:00:00 2001 From: Minin <70429604+mininxd@users.noreply.github.com> Date: Mon, 27 May 2024 12:16:44 +0700 Subject: [PATCH] Update timeApi.js --- api/timeApi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/timeApi.js b/api/timeApi.js index b92c520..cc6af24 100644 --- a/api/timeApi.js +++ b/api/timeApi.js @@ -6,8 +6,8 @@ module.exports = function(req) { axios.get("https://time.akamai.com/") .then(res => { const time = moment(res.data); - const unix = res.data; - const gmtOffset = parseInt(req.query.gmt, 10); + const gmtOffset = req.query.gmt; + const unix = (res.data + (3600 * gmtOffset)); if (!gmtOffset) { resolve({ "info": "query required",