Python Office365 API - TimeZone stays at Local Time
<p>I have this python code below and it works for creating a event in Outlook Calendar. The example below has Start and End time from 3pm to 4pm (I think UTC timezone) </p>

<p>We have users from different regions (Pacific, Mountain, Central... times). What I try to accomplish is the time always be local time. No matter where the user account from it should also default to 3pm to 4pm in their Outlook. </p>

<p>Thanks in advance and please let me know if I need to clarify any of this.</p>

<pre><code># Set the request parameters
url = 'https://outlook.office365.com/api/v1.0/me/events?$Select=Start,End'
user = 'user1@domain.com'

pwd = getpass.getpass('Please enter your AD password: ')


# Create JSON payload
data = {
  "Subject": "Testing Outlock Event",
  "Body": {
    "ContentType": "HTML",
    "Content": "Test Content"
  },
  "Start": "2016-05-23T15:00:00.000Z",
  "End": "2016-05-23T16:00:00.000Z",
      "Attendees": [
    {
      "EmailAddress": {
        "Address": "user1@domain.com",
        "Name": "User1"
      },
       "Type": "Required"  },

       {
      "EmailAddress": {
        "Address": "user2@domain.com",
        "Name": "User2"
      },
       "Type": "Optional"  }
  ]
}

json_payload = json.dumps(data)

# Build the HTTP request
opener = urllib2.build_opener(urllib2.HTTPHandler)
request = urllib2.Request(url, data=json_payload)
auth = base64.encodestring('%s:%s' % (user, pwd)).replace('\n', '')
request.add_header('Authorization', 'Basic %s' % auth)
request.add_header('Content-Type', 'application/json')
request.add_header('Accept', 'application/json')
request.get_method = lambda: 'POST'
# Perform the request
result = opener.open(request)
</code></pre>