Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As of March 21, 2013 Google is not providing this information in their response to the userinfo.profile endpoint -- even though they claim that they do.</p> <p>This documentation claims that timezone is available: <a href="https://developers.google.com/accounts/docs/OAuth2Login?hl=en#userinfocall" rel="nofollow noreferrer">https://developers.google.com/accounts/docs/OAuth2Login?hl=en#userinfocall</a></p> <p>However, the current implementation only returns the following data:</p> <ul> <li>id</li> <li>email</li> <li>verified_email</li> <li>name</li> <li>given_name</li> <li>family_name</li> <li>link (to G+ profile, if available)</li> <li>gender</li> <li>birthday</li> <li>locale</li> <li>hd (appears to be the Google Apps domain, if relevant)</li> </ul> <p>Note that "birthday" and "hd" are not listed in the current documentation on the page listed above. I am verifying these fields from real-world responses I'm receiving from the endpoint.</p> <p>The best approach for getting timezone at the moment is probably to use JavaScript (to retrieve the timezone from the user's browser). This StackOverflow answer explains how to do so:</p> <p><a href="https://stackoverflow.com/questions/1091372/getting-the-clients-timezone-in-javascript">Getting the client&#39;s timezone in JavaScript</a></p> <p>Unfortunately, this would have to occur as a secondary action, meaning you'd have to add this data to your database separately from the data retrieved from the endpoint. One trick to consider is capturing the timezone offset on the page where you initiate the endpoint request, and then appending the timezone offset value to the "state" value in your OAuth request. This value will then be returned on the callback, and you could extract and add it to the other profile information that was returned during the same procedure in which you write to your database.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload