Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 8d4aaed

Browse files
committed
fix interview thank you page timezone
1 parent 94b171e commit 8d4aaed

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/server/misc/routes/interview-thank-you-page.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const url = require("url");
55
const axios = require("axios");
66
const _ = require("lodash");
7-
const moment = require("moment");
7+
const moment = require("moment-timezone");
88
const fs = require("fs");
99

1010
// eslint-disable-next-line
@@ -34,14 +34,16 @@ async function getInterviewThankYouPageController(req, res) {
3434
const { data: timeslots } = await axios.get(
3535
`https://api.schedule.nylas.com/schedule/${query.page_slug}/timeslots?locale=en`
3636
);
37+
const startTime = moment.unix(query.start_time).tz(query.tz);
38+
const endTime = moment.unix(query.end_time).tz(query.tz);
3739
const object = {
3840
jobTitle: nylasconfig.name,
3941
calendarName: _.get(timeslots, "[0].host_name", ""),
4042
tz: query.tz,
41-
week: moment.unix(query.start_time).format("dddd"),
42-
startDate: moment.unix(query.start_time).format("MMMM DD, yyyy"),
43-
startTime: moment.unix(query.start_time).format("H:mm A"),
44-
endTime: moment.unix(query.end_time).format("H:mm A"),
43+
week: startTime.format("dddd"),
44+
startDate: startTime.format("MMMM DD, yyyy"),
45+
startTime: startTime.format("H:mm A"),
46+
endTime: endTime.format("H:mm A"),
4547
};
4648

4749
res.set("Content-Type", "text/html");

0 commit comments

Comments
 (0)