Skip to main content

How to get user timezone through API

  • November 19, 2024
  • 2 replies
  • 11 views

Is there an option to get the user timezone?

2 replies

dvdsmpsn
Forum|alt.badge.img+1
  • Participating Frequently
  • 425 replies
  • November 19, 2024

Try this query:

{
  me {
    id
    time_zone_identifier
  }
  users (ids:[29417812]) {
    id
    time_zone_identifier 
  }
}

It give the timezone for the current user and a specified user:

{
  "data": {
    "me": {
      "id": "29417812",
      "time_zone_identifier": "Europe/London"
    },
    "users": [
      {
        "id": "29417812",
        "time_zone_identifier": "Europe/London"
      }
    ]
  },
  ...
}

  • Author
  • New Participant
  • 2 replies
  • November 19, 2024

Thanks David 🙂 🙂 🙂