I would like to get the default IANA time zone of a user's calendar (which is not necessarily the same timezone that the person as in--or else this would work fine).
I believe the way to do this may be with Settings timezone
to get the time, but the documentation does not seem to cover javascript for this specifically.
This is my attempt, which is inspired by a mix of google's docs here and here:
var timeZoneCalendar = window.gapi.client.calendar.get({
resourceName: '/users/me/settings/timeZoneId'
}).then(function(response) {
console.log(response.result);
}, function(reason) {
console.log('Error: ' + reason.result.error.message);
});
This unfortunately only gives me the error of window.gapi.client.calendar.get is not a function
.
I already use the window.gapi.client.calendar.events.insert
, window.gapi.client.calendar.events.update
, and window.gapi.client.calendar.events.list
in my project so it shouldn't be the window.gapi.client.calendar
that is the issue.
Does anyone have any guesses on how to get this?