# Zoom API - Meeting created with the wrong start date

**URL:** <https://devforum.zoom.us/t/zoom-api-meeting-created-with-the-wrong-start-date/32007>\
**Category:** API and Webhooks\
**Created:** [October 2, 2020, 4:01pm UTC](https://devforum.zoom.us/t/zoom-api-meeting-created-with-the-wrong-start-date/32007 "2020-10-02T16:01:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![amonaldo1996](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/amonaldo1996/32/16336_2.png) [@amonaldo1996](https://devforum.zoom.us/u/amonaldo1996)\
**Post date:** [October 2, 2020, 4:01pm UTC](https://devforum.zoom.us/t/zoom-api-meeting-created-with-the-wrong-start-date/32007/1 "2020-10-02T16:01:44Z")

</div>

I’m working on an elearning website and I’m trying to integrate Zoom meetings using the API

According to the [official documentation](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate), the `start_time` must be set to the `yyyy-MM-ddTH:M:S` .

Example : 2020-10-02T18:00:00

Based on that, this is the code I’m using.

```
class Zoom:
...

    def parse_date(self, date):
        parts = date.strip().split(' ')
        part1 = parts[0]
        part2 = parts[1]
        parts1 = part1.split('/')
        day = parts1[0]
        month = parts1[1]
        year = parts1[2]
        parts2 = part2.split(':')
        h = parts2[0]
        m = parts2[1]
        formatted_date = year + '-' + month + '-' + day + 'T' + h + ':' + m + ':00Z'
        return formatted_date

    def create_meeting(self, topic, start_date, password):
        token = self.get_token()
        conn = http.HTTPSConnection(Zoom.ZOOM_API_URL)      
        headers = {'authorization': "Bearer " + token, 'content-type': "application/json"}
        data = {'topic': topic, 'type': 2, 'start_time': self.parse_date(start_date), 'timezone': 'Africa/Casablanca', 'password': password}
        conn.request("POST", "/v2/users/me/meetings", json.dumps(data), headers)
        response = json.loads(conn.getresponse().read().decode('utf-8'))
        return response

zoom = Zoom('API_KEY', 'API_SECRET')
meeting = zoom.create_meeting(topic='Learning test', start_date='02/10/2020 18:00', password='123456')

```

The meeting is created but the start date is wrong. In the example below I specified 6PM but it was saved with 7PM

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/9/f/9f84957cc26cb6a4be8faca1a1d0c9cde4e3b562.png)

---

<div class="post-metadata">

**Author:** ![j.harlow](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/j.harlow/32/16330_2.png) [@j.harlow](https://devforum.zoom.us/u/j.harlow)\
**Post date:** [October 2, 2020, 4:11pm UTC](https://devforum.zoom.us/t/zoom-api-meeting-created-with-the-wrong-start-date/32007/2 "2020-10-02T16:11:48Z")

</div>

It appears your formatted\_date entry is in Zulu (GMT) time and your timezone is Casablanca, I wonder if it is just the 1 hour time zone offset???

---

<div class="post-metadata">

**Author:** ![amonaldo1996](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/amonaldo1996/32/16336_2.png) [@amonaldo1996](https://devforum.zoom.us/u/amonaldo1996)\
**Post date:** [October 2, 2020, 4:13pm UTC](https://devforum.zoom.us/t/zoom-api-meeting-created-with-the-wrong-start-date/32007/3 "2020-10-02T16:13:13Z")

</div>

I guess the same. Is there a way to fix this ? or do I just have to substract one hour ?

---

<div class="post-metadata">

**Author:** ![j.harlow](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/j.harlow/32/16330_2.png) [@j.harlow](https://devforum.zoom.us/u/j.harlow)\
**Post date:** [October 2, 2020, 4:14pm UTC](https://devforum.zoom.us/t/zoom-api-meeting-created-with-the-wrong-start-date/32007/4 "2020-10-02T16:14:50Z")

</div>

Looks like you can just drop the “Z” to get local time.

```
        formatted_date = year + '-' + month + '-' + day + 'T' + h + ':' + m + ':00Z'

to

        formatted_date = year + '-' + month + '-' + day + 'T' + h + ':' + m + ':00'
```

---

<div class="post-metadata">

**Author:** ![amonaldo1996](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/amonaldo1996/32/16336_2.png) [@amonaldo1996](https://devforum.zoom.us/u/amonaldo1996)\
**Post date:** [October 2, 2020, 4:18pm UTC](https://devforum.zoom.us/t/zoom-api-meeting-created-with-the-wrong-start-date/32007/5 "2020-10-02T16:18:40Z")

</div>

Yes that was it. Documentation can be tricky. Thanks 😃

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [October 5, 2020, 3:11pm UTC](https://devforum.zoom.us/t/zoom-api-meeting-created-with-the-wrong-start-date/32007/6 "2020-10-05T15:11:01Z")

</div>

Thanks for your help @j.harlow! Glad you got this sorted @amonaldo1996. 💯

Let us know if you still have any questions about this.

Best,  
Will

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [November 5, 2020, 1:11am UTC](https://devforum.zoom.us/t/zoom-api-meeting-created-with-the-wrong-start-date/32007/7 "2020-11-05T01:11:04Z")

</div>

Closed on November 5, 2020, 1:11am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
