Skip to content

Commit 7217160

Browse files
Merge pull request #428 from derekantrican/427-referenceerror-calendartz-is-not-defined
Fix calendartz not defined
2 parents f2fd344 + c7248d5 commit 7217160

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Helpers.gs

+3-3
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,11 @@ function createEvent(event, calendarTz){
373373
newEvent = {
374374
start: {
375375
dateTime : icalEvent.startDate.toString(),
376-
timeZone : validateTimeZone(icalEvent.startDate.timezone.toString())
376+
timeZone : validateTimeZone(icalEvent.startDate.timezone.toString(), calendarTz)
377377
},
378378
end: {
379379
dateTime : icalEvent.endDate.toString(),
380-
timeZone : validateTimeZone(icalEvent.endDate.timezone.toString())
380+
timeZone : validateTimeZone(icalEvent.endDate.timezone.toString(), calendarTz)
381381
},
382382
};
383383
}
@@ -820,7 +820,7 @@ function processTasks(responses){
820820
* @param {string} tzid - Timezone descriptor to validate
821821
* @return {string} Valid IANA timezone descriptor
822822
*/
823-
function validateTimeZone(tzid){
823+
function validateTimeZone(tzid, calendarTz){
824824
let IanaTZ;
825825
if (tzids.indexOf(tzid) == -1){
826826
if (tzid in tzidreplace){

0 commit comments

Comments
 (0)