googleapis / googleapis/google-api-nodejs-client

Freebusy API returning Bad Request when specifying timezone

Abierto
#3,145 0 comentarios 0 reacciones 1 asignado Reclamado por @sofisl Ver en GitHub
priority: p2 type: bug
Lenguaje dominante
TypeScript
Estrellas
12.2k
Forks
2k
Merge medio
1 d 9 h
PR fusionados (30 d)
24

Descripción

1) Is this a client library issue or a product issue?
Library issue

2) Did someone already solve this?
No

3) Do you have a support contract?
No

#### Environment details

- OS: MacOs 13.0.1, Apple M1
- Node.js version: 16.17.1
- npm version: 8.15.0
- `googleapis` version: @googleapis/calendar: "^3.0.0",

#### Steps to reproduce

1. Request freebusy with timezone, Bad Request

The following _**works**_
```
const resp = await calendar.freebusy.query({
requestBody: {
calendarExpansionMax: 1,
items: [{ id: calendarId }],
timeMax: '2023-02-01T10:00:00Z',
timeMin: '2023-02-01T05:00:00Z',
},
});
```

This also **_works_**
```
const resp = await calendar.freebusy.query({
requestBody: {
calendarExpansionMax: 1,
items: [{ id: calendarId }],
timeMax: '2023-02-01T10:00:00-05:00',
timeMin: '2023-02-01T05:00:00-05:00',
},
});
```

The following does _**NOT**_ work
```
const resp = await calendar.freebusy.query({
requestBody: {
calendarExpansionMax: 1,
items: [{ id: calendarId }],
timeMax: '2023-02-01T10:00:00',
timeMin: '2023-02-01T05:00:00',
timeZone: 'EST',
},
});
```

The following also does _**NOT**_ work
```
const resp = await calendar.freebusy.query({
requestBody: {
calendarExpansionMax: 1,
items: [{ id: calendarId }],
timeMax: '2023-02-01T10:00:00',
timeMin: '2023-02-01T05:00:00',
timeZone: 'America/Toronto',
},
});
```

Error:
```
Error: Bad Request
at Gaxios._request (.../node_modules/google-auth-library/node_modules/gaxios/src/gaxios.ts:158:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async JWT.requestAsync (.../node_modules/google-auth-library/build/src/auth/oauth2client.js:382:18)
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.