Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

198
Visualizações
Google calendar email invites are showing time in UTC or organizer timezone rather than the invitee local timezone

My app is using google events to schedule appointments for users and allow them to send invites to their clients. The events and all the invites are being set up correctly. However, the email invites sent to users either have the date set in UTC or the date is in the default timezone of the organizer rather than the invitee default timezone. Below is my event object

 const eventData = {
                "summary":  "Appointment booking for service ABC"
                "description": "Appointment booking for service ABC",
                'start': {
                    'dateTime': new Date(booking.date+" UTC"),
                    'timeZone': defaultTimezone() 
                },
                'end': {
                    'dateTime': addDateMins(new Date(booking.date+" UTC"), parseInt(booking.duration)),
                    'timeZone': defaultTimezone()
                },
                "extendedProperties": {
                    "private": {
                        "priority": "high"
                    }
                },
                'attendees': [
                    {
                        'email' : client.email,
                        'displayName' :client.fName ? client.fName: "Unknown User",
                        'organizer' : false, 
                        'responseStatus' : "needsAction",
                    }
                ],
                'reminders': {
                    'useDefault': false,
                    'overrides': [
                        {'method': 'email', 'minutes': 24 * 60},
                        {'method': 'popup', 'minutes': 10}
                    ]
                }
            };

addEvent(eventData, gMeetVersion).then((gEventResult)=>{
   console.log("yeey")
})

my add event function is as follows:

export const addEvent = (eventData, conferenceDataVersion = 0)=>new Promise(function(successCallBack, errorCallback){

refreshGoogleTokens().then(()=>{

  const user = JSON.parse(localStorage.getItem("user"))
  const headers = {
      "Content-Type": "application/json",
      "Authorization": "Bearer "+ user.token
  }
  const url = "https://www.googleapis.com/calendar/v3/calendars/primary/events?conferenceDataVersion="
      +conferenceDataVersion+"&sendUpdates=all"
  
  axios.post(url, eventData, {headers:headers})
    .then(successCallBack)
    .catch(errorCallback);
}).catch(errorCallback)
})
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda