Skip to content

Commit 65d4f78

Browse files
committed
fix the time difference in server and local time
1 parent 8a9d6a1 commit 65d4f78

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

controllers/student.controller.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,11 @@ studentRouter.post(
178178
version: "v4",
179179
auth: authClientObject,
180180
});
181-
const values = [
182-
[
183-
email,
184-
description,
185-
moment().format("YYYY-MM-DD"),
186-
moment().utc(true).format("LT"),
187-
],
188-
];
181+
182+
const date = moment().format("YYYY-MM-DD");
183+
const time = moment().add(5, "hours").add(30, "minutes").format("LT");
184+
185+
const values = [[email, description, date, time]];
189186
const writeData = await sheet.spreadsheets.values.append({
190187
auth,
191188
spreadsheetId,

0 commit comments

Comments
 (0)