Zendesk user info gives wrong timezone and locale information | Community
Skip to main content

Zendesk user info gives wrong timezone and locale information

  • March 30, 2023
  • 3 replies
  • 0 views

Eren

There are about 600 tickets. And the userinfo timezone value of all users in these tickets: Istanbul and the userinfo locale value: English(United State). I tried to fix this version many times using Zendesk API, but it didn't work. I connect to the customer representative, but they either don't respond or they can't find a solution.

3 replies

Helen20
  • March 30, 2023

Hi, @eren, thank you for your post. To better support you, will you add the specific API you reference here. For example, I am not sure if you are referencing this, this, or something completely different. Thank you.


Eren
  • Author
  • March 30, 2023
After I included it in my site with Zendeski code. At first I tried only the first code and it didn't work. Then I tried the second code and it didn't work either.                                                                      1- <script>
      function userLocation() {
        fetch('https://ipinfo.io/json')
          .then(response => response.json())
          .then(data => {
            const settings = {
              user: {
                city: data.city,
                ip: data.ip,
              },
            };
            zE('webWidget', 'updateSettings', settings);
          });
      }
      userLocation();
    </script>
       
2- zE(function() {
        user_timezone = zE('webWidget:get', 'timeZone');
        user_locale = zE('webWidget:get', 'locale');
        zE('webWidget', 'updateSettings', {
          webWidget: { timeZone: user_timezone, locale: user_locale },
        });
      });

Helen20
  • April 6, 2023

Hi, @eren, to better support you, can you confirm that you are referring to this API

Secondly, might this be the same issue that is described in this feature request