Skip to content

Commit 00ea3fb

Browse files
thomasyzy7kevin-lannAustin-Xminhhaitran08MasahisaSekita
authored
Hotfix/1.0.6 - main (#144)
Co-authored-by: Kevin Lan <[email protected]> Co-authored-by: Austin-X <[email protected]> Co-authored-by: minhhaitran08 <[email protected]> Co-authored-by: Masahisa Sekita <[email protected]> Co-authored-by: Austin-X <[email protected]> Co-authored-by: dawangk <[email protected]> Co-authored-by: kevin-lann <[email protected]> Co-authored-by: MasahisaSekita <[email protected]> Co-authored-by: Dmitriy Prokopchuk <[email protected]>
1 parent 63ed492 commit 00ea3fb

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

.github/workflows/autodeploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ jobs:
124124
sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/course-matrix-backend:master
125125
126126
# Step 15: Run the docker containers
127-
sudo docker run -d -p 5173:5173 ${{ secrets.DOCKERHUB_USERNAME }}/course-matrix-frontend:master
128-
sudo docker run -d -p 8081:8081 ${{ secrets.DOCKERHUB_USERNAME }}/course-matrix-backend:master
127+
sudo docker run -d -p 5173:5173 -e TZ=America/Toronto -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro ${{ secrets.DOCKERHUB_USERNAME }}/course-matrix-frontend:master
128+
sudo docker run -d -p 8081:8081 -e TZ=America/Toronto -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro ${{ secrets.DOCKERHUB_USERNAME }}/course-matrix-backend:master
129129
130130
# Step 16: Run post deployment tests
131131
sudo docker ps

course-matrix/backend/src/utils/convert-time-string.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,16 @@ export function convertTimeStringToDate(timeString: string): Date {
1616
date.setSeconds(seconds);
1717
date.setMilliseconds(0);
1818

19-
return date;
19+
// Convert to EDT (GMT-4)
20+
// First get the UTC time by adding the local timezone offset
21+
const utcDate = new Date(date.getTime() + date.getTimezoneOffset() * 60000);
22+
23+
// Then subtract 4 hours for EDT
24+
const edtOffset = -4 * 60 * 60000;
25+
const edtDate = new Date(utcDate.getTime() + edtOffset);
26+
27+
console.log("Original date:", date);
28+
console.log("EDT date:", edtDate);
29+
30+
return edtDate;
2031
}

course-matrix/frontend/src/pages/TimetableBuilder/CreateCustomSetting.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ const CreateCustomSetting = ({
175175
restrictionForm.setValue("maxGap", undefined);
176176
restrictionForm.setValue("numDays", undefined);
177177
}}
178+
value={field.value}
178179
defaultValue={""}
179180
>
180181
<SelectTrigger className="w-[320px]">

0 commit comments

Comments
 (0)