Automatically detect and store customer timezones for incoming cases

Last Updated -

Wouldn't it be great to automatically detect customer timezones and present this information to your agents?

By adding a bit of code to the "Email (New)" section of your support center theme, you can set a customer custom field to the user's timezone. This way, as cases that were submitted from your support center come into Desk, you'll know the customer's timezone right away.

In the below example, we're going to use the 4 time zones that cover the U.S. To expand the timezones, or use completely different ones, add the corresponding values to the custom field. Check out this article for a full list of all timezones

Before adding code to your support center theme's contact form, create a customer custom field with key "time_zone" and with the 4 values used below: 
  • (GMT-08:00) Pacific Time (US & Canada)
  • (GMT-07:00) Mountain Time (US & Canada)
  • (GMT-06:00) Central Time (US & Canada)
  • (GMT-05:00) Eastern Time (US & Canada)

Now, enter the following code within your Default support center theme. To learn more about updating your support center theme, read this article

Source Code: