Mismatch start_time of the scheduled meeting

Description
I am creating a scheduled meeting via meetings API by entering the details on my platform. The start_time is stored in UTC format and sent in the format 2020-08-24T06:30:00Z along with other required data. On my platform, the start_time fetched from the DB and is shown correctly and the same is sent to the zoom as well but on the zoom, the meeting is created with the time which is ahead by 05:30 hr from the sent start time.

Error
No error message is thrown and the meeting is also created successfully but the start_time sent is not with which the meeting is created on the zoom.

Which version?
API endpoint used, https://api.zoom.us/v2/users/{userId}/meetings

Additional context
I am using Ruby on Rails. The sample DB record,

#<ZoomMeeting id: 1, name: "New test meeting", description: "Random description for checking.", start_time: "2020-08-24 06:30:00 UTC", duration: 30>

Data sent via API,

data = {
    "topic": ZoomMeeting.find(1).name, # New test meeting
    "type": 2, # Scheduled meeting
    "start_time": ZoomMeeting.find(1).start_time.try(:strftime, "%Y-%m-%dT%H:%M:%SZ"), # 2020-08-24T06:30:00Z
    "duration": ZoomMeeting.find(1).duration, # 30
    "agenda": ZoomMeeting.find(1).description # Random description for checking.
}

Hey @aditya.tiwari,

What is the response body JSON from the Create Meeting Endpoint you are calling?

Thanks,
Tommy

Hey @tommy,

I have added the method I used to create the meeting,

def createZoomMeeting
    url = URI("https://api.zoom.us/v2/users/{userId}/meetings")

    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE

    @api_key = "my api key"
    @api_secret = "my api secret"
    token = JWT.encode({iss: @api_key, exp: 1.hour.from_now.to_i}, @api_secret, 'HS256', {typ: 'JWT'})

    request = Net::HTTP::Post.new(url)
    request["authorization"] = "Bearer #{token}"
    request["content-type"] = 'application/json'
    data = {
        "topic": ZoomMeeting.find(1).name, # New test meeting
        "type": 2, # Scheduled meeting
        "start_time": ZoomMeeting.find(1).start_time.try(:strftime, "%Y-%m-%dT%H:%M:%SZ"), # 2020-08-24T06:30:00Z
        "duration": ZoomMeeting.find(1).duration, # 30
        "agenda": ZoomMeeting.find(1).description # Random description for checking.
    }
    request.body = data.to_json
    response = http.request(request)
    result = JSON.parse(response.read_body)
    return result
end

Hey @aditya.tiwari,

Can you pease share the response body JSON?

I want to see the data the API returns.

Thanks,
Tommy

Hey @tommy,

The response body JSON returned by the API,

{"account_id"=>"pq...Bw", "operator"=>"in...in", "operator_id"=>"Yd...pg", "object"=>{"uuid"=>"WU...==", "id"=>97...13, "host_id"=>"Yd...pg", "topic"=>"New test meeting", "type"=>2, "start_time"=>"2020-09-24T12:00:00Z", "duration"=>30, "timezone"=>"Asia/Calcutta"}}

Hey @aditya.tiwari,

Can you try removing the Z from the start_time field? When you include the Z, the API will use GMT, as opposed to the timezone you’re referencing:
image

Let me know if this helps!

Thanks,
Will

Hey @will.zoom,

The timezone got added with the response body, I am sending the start_time without the timezone because of which Z is added. Why timezone is automatically getting added? This was working fine till the start of August.

In the DB I store the start_time in GTM because from different timezones meetings can be created.

In the future, we will be having hosts from multiple timezones and that is why GTM format should be prefered.

Hey @aditya.tiwari,

In the original post, it looks like you’re passing the Z in your request body—is that possible?:


“%Y-%m-%dT%H:%M:%SZ

-Will

Hey @will.zoom,

Yes, I am passing the timezone with Z since in the DB it is stored in the GTM format. Ideally, it should automatically convert to the timezone which is configured in the zoom account since the timezone is not passed explicitly.

In my zoom account, I have IST as the timezone which is ahead by 5 hours and 30 minutes from GTM, so what is happening here is the sent GTM time is converted to IST and in the converted IST time again 5 hours and 30 minutes are added. Basically, 11 hours are getting added to the sent time which is not correct I suppose.

Hi @aditya.tiwari,

Just to make sure we’re on the same page, the start_time in the response will always be in GMT time, which is 5.5 hours behind IST time, so you should take this into account when passing the time in GMT initially.

Typically all server times are based on GMT , so then you can convert the GMT time to the local timezone on the client browser/device.

Alternatively, if you remove the Z from your timestamp and leave the timezone set to Asia/Calcutta, are you getting results more in line with what you’re looking for?

Let me know,
Will

Hi @will.zoom,

I am not converting the GTM time to IST time and then adding Z to it while sending the request. The time is sent in GTM format only.

Secondly, after removing Z I need to convert the start_time that is stored in my DB to IST time and set timezone to Asia/Calcutta, this is working as expected but I don’t want to take that path because the meeting can happen in different timezones and handling those conversions will be an additional step which I need to perform.

Hi @aditya.tiwari,

Apologies for all the back and forth on this—I just DM’d you to offer some 1:1 support.

Thanks,
Will

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