Skip to content

Commit 53c528b

Browse files
authored
Hotfix timezones on schedule (#1147)
* Fix timeone schedule * whooops
1 parent a99b5ac commit 53c528b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,23 @@ function handleEventData(events) {
187187

188188
events.forEach(event => {
189189
let startDate = new Date(event.start); // convert ISO 8601 -> Date object
190+
191+
// FIXME: Hotfix for time zone bug in HM
192+
// needs to return GMT to us, but it is translating to EST for some reason
193+
// We want HM to be the canonical time for now, so 12pm in HM
194+
startDate.setHours(startDate.getHours() - 5);
195+
190196
let finishDate = undefined;
191197

192198
let dateString = convertDate(startDate);
193199
if (event.finish) { // finish === null for instantaneous events
194200
finishDate = new Date(event.finish);
201+
202+
// FIXME: Hotfix for time zone bug in HM
203+
// needs to return GMT to us, but it is translating to EST for some reason
204+
// We want HM to be the canonical time for now, so 12pm in HM
205+
finishDate.setHours(finishDate.getHours() - 5);
206+
195207
let finishString = convertDate(finishDate);
196208
if (dateString.slice(-2) === finishString.slice(-2)) { // hide "am/pm" of first time if both are identical
197209
dateString = dateString.slice(0, -2);

0 commit comments

Comments
 (0)