# Zoom Meeting Api is not implementing Meeting Start time correctly which i am passing to it in PHP

**URL:** <https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732>\
**Category:** API and Webhooks\
**Created:** [June 30, 2020, 7:18am UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732 "2020-06-30T07:18:29Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdullah](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@abdullah](https://devforum.zoom.us/u/abdullah)\
**Post date:** [June 30, 2020, 7:18am UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/1 "2020-06-30T07:18:29Z")

</div>

**Description**  
When i am passing time to zoom api it does not schedule meeting on my mention time and in repsonse i am getting incorrect time which i have pass to api  
I am passing the date time which is **2020-07-02 13:20:00** and time zone Asia/Tashkent here is the response which i am getting after passing mention time:-

stdClass Object  
(  
[uuid] =\>  
[id] =\> \*\*\*\*\*\*\*\*\*\*\*  
[host\_id] =\>  
[topic] =\> czdcadc  
[type] =\> 2  
[status] =\> waiting  
**[start\_time] =\> 2020-07-02T03:20:00Z**  
[duration] =\> 60  
[timezone] =\> Asia/Tashkent  
[created\_at] =\> 2020-06-30T06:54:25Z  
[password] =\>  
[h323\_password] =\>  
[pstn\_password] =\>  
[encrypted\_password] =\>  
[settings] =\> stdClass Object  
(  
[host\_video] =\>  
[participant\_video] =\>  
[cn\_meeting] =\>  
[in\_meeting] =\>  
[join\_before\_host] =\>  
[mute\_upon\_entry] =\>  
[watermark] =\>  
[use\_pmi] =\>  
[approval\_type] =\> 2  
[audio] =\> voip  
[auto\_recording] =\> none  
[enforce\_login] =\>  
[enforce\_login\_domains] =\>  
[alternative\_hosts] =\>  
[close\_registration] =\>  
[registrants\_confirmation\_email] =\> 1  
[waiting\_room] =\> 1  
[registrants\_email\_notification] =\> 1  
[meeting\_authentication] =\>  
)

)

**Here is my code:**  
protected function sendRequest($data) {  
$request\_url = ‘[https://api.zoom.us/v2/users/me/meetings](https://api.zoom.us/v2/users/me/meetings)’;  
$headers = array(  
"authorization: Bearer ".$this-\>generateJWTKey(),  
‘content-type: application/json’  
);  
$postFields = json\_encode($data);  
$ch = curl\_init();  
curl\_setopt($ch, CURLOPT\_HTTPHEADER, $headers);  
curl\_setopt($ch, CURLOPT\_RETURNTRANSFER,1);  
curl\_setopt($ch, CURLOPT\_URL, $request\_url);  
curl\_setopt($ch, CURLOPT\_POST, 1);  
curl\_setopt($ch, CURLOPT\_POSTFIELDS, $postFields);  
curl\_setopt($ch, CURLOPT\_SSL\_VERIFYPEER, false);  
$response = curl\_exec($ch);  
$err = curl\_error($ch);  
curl\_close($ch);  
if(!$response){  
return $err;  
}  
return json\_decode($response);  
}

//function to generate JWT  
private function generateJWTKey() {  
$key = $this-\>zoom\_api\_key;  
$secret = $this-\>zoom\_api\_secret;  
$token = array(  
“iss” =\> $key,  
“exp” =\> time() + 3600 //60 seconds as suggested  
);  
// $token = “”;  
return JWT::encode( $token, $secret );  
}

public function createAMeeting( $data = array() ) {  
$post\_time = $data[‘start\_date’];  
$start\_time = gmdate( “Y-m-d\TH:i:s”, strtotime( $post\_time ) );  
$createAMeetingArray = array();  
if ( ! empty( $data[‘alternative\_host\_ids’] ) ) {  
if ( count( $data[‘alternative\_host\_ids’] ) \> 1 ) {  
$alternative\_host\_ids = implode( “,”, $data[‘alternative\_host\_ids’] );  
} else {  
$alternative\_host\_ids = $data[‘alternative\_host\_ids’][0];  
}  
}  
$createAMeetingArray[‘topic’] = $data[‘meetingTopic’];  
$createAMeetingArray[‘agenda’] = ! empty( $data[‘agenda’] ) ? $data[‘agenda’] : “”;  
$createAMeetingArray[‘type’] = ! empty( $data[‘type’] ) ? $data[‘type’] : 2; //Scheduled  
$createAMeetingArray[‘start\_time’] = $start\_time;  
$createAMeetingArray[‘timezone’] = $data[‘timezone’];  
$createAMeetingArray[‘password’] = ! empty( $data[‘password’] ) ? $data[‘password’] : “”;  
$createAMeetingArray[‘duration’] = ! empty( $data[‘duration’] ) ? $data[‘duration’] : 60;  
$createAMeetingArray[‘settings’] = array(  
‘join\_before\_host’ =\> ! empty( $data[‘join\_before\_host’] ) ? true : false,  
‘host\_video’ =\> ! empty( $data[‘option\_host\_video’] ) ? true : false,  
‘participant\_video’ =\> ! empty( $data[‘option\_participants\_video’] ) ? true : false,  
‘mute\_upon\_entry’ =\> ! empty( $data[‘option\_mute\_participants’] ) ? true : false,  
‘enforce\_login’ =\> ! empty( $data[‘option\_enforce\_login’] ) ? true : false,  
‘auto\_recording’ =\> ! empty( $data[‘option\_auto\_recording’] ) ? $data[‘option\_auto\_recording’] : “none”,  
‘alternative\_hosts’ =\> isset( $alternative\_host\_ids ) ? $alternative\_host\_ids : “”  
);  
return $this-\>sendRequest($createAMeetingArray);  
}  
**This is the function which i am running to create meeting**  
function Hellozoom($title,$md,$mt,&$resp=array()){  
try{

$z = $this-\>createAMeeting(  
array(  
‘start\_date’=\>date(“Y-m-d H:i:s”, strtotime($md." ".$mt)),  
‘meetingTopic’=\>$title,  
‘timezone’=\>‘Asia/Tashkent’  
)  
);  
$resp=$z;  
//print\_r($z);  
} catch (Exception $ex) {  
echo $ex;  
}  
}

\*This post has been edited to remove any meeting / webinar IDs

---

<div class="post-metadata">

**Author:** ![yash.sakali](https://avatars.discourse-cdn.com/v4/letter/y/a698b9/32.png) [@yash.sakali](https://devforum.zoom.us/u/yash.sakali)\
**Post date:** [June 30, 2020, 8:55am UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/2 "2020-06-30T08:55:39Z")

</div>

Infront of gmdate() function just use date() function and pass parameter it will work perfectly…

---

<div class="post-metadata">

**Author:** ![abdullah](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@abdullah](https://devforum.zoom.us/u/abdullah)\
**Post date:** [June 30, 2020, 10:38am UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/3 "2020-06-30T10:38:19Z")

</div>

But i am getting different times on zoom account and response  
Here is my correct time 3:26 pm which is also showing same from zoom api response  
It is bold one  
{

```
* "uuid":",
* "id": *********** ,
* "host_id":"",
* "topic":"some assets",
* "type":2,
* "status":"waiting",
 **"start_time":"2020-07-08T15:26:00Z",**
* "duration":60,
* "timezone":"Asia/Tashkent",
* "created_at":"2020-06-30T10:28:45Z",
* "start_url":"",
* "join_url":"",
* "password":"",
* "h323_password":"",
* "pstn_password":"",
* "encrypted_password":"",
* "settings":{
  * "host_video":false,
  * "participant_video":false,
  * "cn_meeting":false,
  * "in_meeting":false,
  * "join_before_host":false,
  * "mute_upon_entry":false,
  * "watermark":false,
  * "use_pmi":false,
  * "approval_type":2,
  * "audio":"voip",
  * "auto_recording":"none",
  * "enforce_login":false,
  * "enforce_login_domains":"",
  * "alternative_hosts":"",
  * "close_registration":false,
  * "registrants_confirmation_email":true,
  * "waiting_room":true,
  * "registrants_email_notification":true,
  * "meeting_authentication":false}

}

```

> Blockquote

But On Zoom Account

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/c/cb0d2cceb605b4ae977b38d9de6cdf822608a3c4.png)

\*This post has been edited to remove any meeting / webinar IDs

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 1, 2020, 10:00pm UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/5 "2020-07-01T22:00:52Z")

</div>

Hey @abdullah,

If you are including the `Z` in the `start_time`, it will be sent with GMT time and not your `timezone`. Try removing the `Z`.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![swamivenkat](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@swamivenkat](https://devforum.zoom.us/u/swamivenkat)\
**Post date:** [August 26, 2020, 4:20am UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/6 "2020-08-26T04:20:27Z")

</div>

I have send the Body text like,  
{  
“topic”: “Demo on 26th”,  
“Type”: 2,  
“Start\_Time”: “2020-08-25T10:00:00”,  
“Duration”: 30,  
“Timezone”: “”,  
“Password”: “”,  
“Recurrence”: {  
“Type”: 1,  
“Repeat\_Interval”: 1,  
“Weekly\_Days”: 2,  
“Monthly\_Day”: 1,  
“Monthly\_Week”: 1,  
“Monthly\_Week\_Day”: 2,  
“End\_Times”: 1,  
“End\_Date\_Time”: “2040-12-31T23:59:59”  
},  
“Settings”: {  
“AlternativeHosts”: “”,  
“Approval\_Type”: 2,  
“Audio”: “both”,  
“Auto\_Recording”: “cloud”,  
“Close\_Registration”: false,  
“Cn\_Meeting”: false,  
“Enforce\_Login”: false,  
“Enforce\_Login\_Domains”: “”,  
“Global\_Dial\_In\_Countries”: [  
“US”  
],  
“Global\_Dial\_In\_Numbers”: ,  
“Host\_Video”: true,  
“In\_Meeting”: false,  
“Join\_Before\_Host”: true,  
“Mute\_Upon\_Entry”: false,  
“End\_Date\_Time”: null,  
“Participant\_Video”: true,  
“Registrants\_Confirmation\_Email”: true,  
“Use\_Pmi”: false,  
“Waiting\_Room”: false,  
“Watermark”: false,  
“Registrants\_Email\_Notification”: true  
}  
}  
and got current UTC time as start time in response.

{  
“created\_at”: “2020-08-26T04:16:40Z”,  
“duration”: 60,  
“host\_email”: “”,  
“host\_id”: “”,  
“id”: \*\*\*\*\*\*\*\*\*\*\*,  
“join\_url”: “”,  
“settings”: {  
“alternative\_hosts”: “”,  
“approval\_type”: 2,  
“audio”: “both”,  
“auto\_recording”: “none”,  
“close\_registration”: false,  
“cn\_meeting”: false,  
“enforce\_login”: false,  
“enforce\_login\_domains”: “”,  
“global\_dial\_in\_countries”: [  
“US”  
],  
“global\_dial\_in\_numbers”: [  
{  
“country”: “US”,  
“country\_name”: “US”,  
“number”: “+1 3126266799”,  
“type”: “toll”  
},  
{  
“country”: “US”,  
“country\_name”: “US”,  
“number”: “+1 9292056099”,  
“type”: “toll”  
},  
{  
“country”: “US”,  
“country\_name”: “US”,  
“number”: “+1 3017158592”,  
“type”: “toll”  
},  
{  
“country”: “US”,  
“country\_name”: “US”,  
“number”: “+1 3462487799”,  
“type”: “toll”  
},  
{  
“country”: “US”,  
“country\_name”: “US”,  
“number”: “+1 6699006833”,  
“type”: “toll”  
},  
{  
“country”: “US”,  
“country\_name”: “US”,  
“number”: “+1 2532158782”,  
“type”: “toll”  
}  
],  
“host\_video”: false,  
“in\_meeting”: false,  
“join\_before\_host”: false,  
“meeting\_authentication”: false,  
“mute\_upon\_entry”: false,  
“participant\_video”: false,  
“registrants\_confirmation\_email”: true,  
“registrants\_email\_notification”: true,  
“request\_permission\_to\_unmute\_participants”: false,  
“use\_pmi”: false,  
“waiting\_room”: true,  
“watermark”: false  
},  
“start\_time”: “2020-08-26T04:16:40Z”,  
“start\_url”: “”,  
“status”: “waiting”,  
“timezone”: “UTC”,  
“topic”: “Demo on 26th”,  
“type”: 2,  
“uuid”: “”  
}

URL: [https://api.zoom.us/v2/users/{userId}/meetings](https://api.zoom.us/v2/users/%7BuserId%7D/meetings)  
user\_id:

\*This post has been edited to remove any meeting / webinar IDs

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 27, 2020, 9:43pm UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/7 "2020-08-27T21:43:57Z")

</div>

Hey @swamivenkat,

I have replied to you here:

> [@Always meeting start time is current date time when Create Schedule Meeting by Zoom API](https://devforum.zoom.us/t/always-meeting-start-time-is-current-date-time-when-create-schedule-meeting-by-zoom-api/28112/2):
>
> Hey @swamivenkat, You need to either pass in a timezone, or add Z to the end of your state\_time. Try that and let me know if it work! slight_smile Thanks, Tommy

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![xiaotu](https://avatars.discourse-cdn.com/v4/letter/x/b77776/32.png) [@xiaotu](https://devforum.zoom.us/u/xiaotu)\
**Post date:** [November 27, 2020, 12:30am UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/8 "2020-11-27T00:30:12Z")

</div>

UTC time like this, won’t work within API:  
2020-11-27T00:00:00Z

---

<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:** [November 30, 2020, 7:57pm UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/9 "2020-11-30T19:57:50Z")

</div>

Hi @xiaotu,

Can you share the full request body you’re sending and the response with any errors? This will help to debug.

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![pankaj.sharma2089](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@pankaj.sharma2089](https://devforum.zoom.us/u/pankaj.sharma2089)\
**Post date:** [December 8, 2020, 11:59am UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/10 "2020-12-08T11:59:53Z")

</div>

Hello Tommy,

We are not using Z. but we are getting the same issue.

---

<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:** [December 9, 2020, 5:03pm UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/11 "2020-12-09T17:03:50Z")

</div>

Hi @pankaj.sharma2089,

Can you please share the full request body JSON that you’re using and the response you’re getting? This will help us to take a closer look.

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![pankaj.sharma2089](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@pankaj.sharma2089](https://devforum.zoom.us/u/pankaj.sharma2089)\
**Post date:** [January 8, 2021, 4:40am UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/12 "2021-01-08T04:40:54Z")

</div>

Hi Will,

Since yesterday I am facing the same issue, before that it was working for me, getting ‘Your connection has timed out and you cannot join the meeting. Verify your network connectivity and try again.’ error while trying to join/host a meeting using web-sdk.  
I am creating meetingRoom from zoom create meeting api and then trying to enter meeting from web-sdk.  
Let me know if you need more info on the same, I am continuously facing the issue for all meetings.

this is one of the config for which it failed:

- We use SDK 1.7.8
- Developer account is **not** pro
- Key/secret is JWT API
- Error showing all meetings

SDK JOIN MEETING CODE

ZoomMtg.preLoadWasm();

```
ZoomMtg.prepareJssdk();

var meetConfig = {

    apiKey: "<?php echo ZOOM_API_KEY ?>",

    apiSecret: "<?php echo ZOOM_API_SECRET ?>",

    meetingNumber: "<?php echo $meetingID; ?>",

    userName: "<?php echo $name;?>",

    passWord: "<?php echo $class_rooms->room_password;?>",

    leaveUrl: "<?php echo '/onlineclasses/' ;?>",

    role: <?php echo $usertype == 'Student'?0:1; ?>

};

var signature = ZoomMtg.generateSignature({

    meetingNumber: meetConfig.meetingNumber,

    apiKey: meetConfig.apiKey,

    apiSecret: meetConfig.apiSecret,

    role: meetConfig.role,

    success: function(res){

        console.log(res.result);

    }

});

ZoomMtg.init({

    leaveUrl: meetConfig.leaveUrl,

    isSupportAV: true,

    success: function () {

        ZoomMtg.join(

            {

                meetingNumber: meetConfig.meetingNumber,

                userName: meetConfig.userName,

                signature: signature,

                apiKey: meetConfig.apiKey,

                passWord: meetConfig.passWord,

                success: function(res){

                    $('.header, .main-footer').remove();

                },

                error: function(res) {

                    console.log(res);

                }

            }

        );

    },

    error: function(res) {

        console.log(res);

    }

});
```

---

<div class="post-metadata">

**Author:** ![pankaj.sharma2089](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@pankaj.sharma2089](https://devforum.zoom.us/u/pankaj.sharma2089)\
**Post date:** [January 8, 2021, 4:45am UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/13 "2021-01-08T04:45:14Z")

</div>

Please help me. It’s very urgent. Because my app is live and online classes will be already started.

Thank You

---

<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:** [January 8, 2021, 5:56pm UTC](https://devforum.zoom.us/t/zoom-meeting-api-is-not-implementing-meeting-start-time-correctly-which-i-am-passing-to-it-in-php/22732/14 "2021-01-08T17:56:16Z")

</div>

Hi @pankaj.sharma2089 ,

Since this is more related to our Web SDK, please create a new topic here: #client-web-sdk

In the meantime, please ensure the credentials you’re using to generate your signature belong to a Pro account.

Thank you,  
Will
