🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 20, 2026

How to Add a Time Zone Field to Gravity Forms with Auto-Detect and Conversion

GravityExtra
How to Add a Time Zone Field to Gravity Forms with Auto-Detect and Conversion

Nothing makes a call booking form fail faster than a time without a time zone. A visitor in Ho Chi Minh City types 8:30 in the evening, your team in Denver reads 8:30 in the evening, and someone gets up very early or waits for a call that never comes. The fix is not complicated: ask for the visitor’s time zone, store it properly, and convert the date and time for the person who reads it. In this tutorial we add a time zone field to a Gravity Forms booking form, let the browser fill it in, convert the time to the site’s zone, and print the result in a notification, using the Gravity Forms Time Zone add-on.

A Book a call form with a name, a day, a time and a Time Zone field that already shows Europe/Paris with its UTC offset, and a line under the field that says 6:00 pm in Europe/Paris is 10:00 am in the site time zone
The visitor’s zone is selected on load and a line under the field shows the conversion while they type.

Why a Plain Drop-Down Is Not Enough

A drop-down with a few hand typed choices such as Eastern, Central and Pacific is the first thing most people try. It has three problems. The names are ambiguous: Central can mean the United States, Europe or Australia. The list is never long enough, so somebody in Kathmandu picks the nearest wrong answer. And the offset changes during the year, so a label that says Eastern minus five is wrong for half of it. A proper list uses the names from the IANA time zone database, such as America/New_York or Asia/Kathmandu. Each name carries its own rules for daylight saving time, in the past and in the future.

That list has over four hundred names. Nobody wants to scroll through four hundred names, which is why a good time zone field has two more features: it picks the visitor’s zone for them, and it lets them search.

Step 1: Add the Field

Create or open your form. For a booking form you need a Date field and a Time field, a name and whatever else you ask for. Then add the Time Zone field from the Advanced Fields group. The defaults are sensible: the visitor’s zone is detected from the browser, the list shows the offset and the local time of each zone, and a search box sits above it.

Every label shows the UTC offset and the current time in that zone. This is surprisingly useful. A visitor who is unsure whether they are in Chicago or Denver can look at the time on their own wall clock and choose the label that matches.

Step 2: Let the Browser Choose

Browsers know the time zone of the computer or phone they run on. The add-on asks for it when the form loads and selects it. The visitor sees a short note, Detected from your browser, and can change it with one click. Most visitors never have to touch the field.

Two details make this reliable. First, some browsers still report older names, such as Asia/Calcutta for the city that is now Asia/Kolkata. The add-on maps those to the names in its list. Second, detection never overwrites a choice. If the form comes back with an error message, if the visitor goes back a page, or if they resume a saved form on another computer, the zone they chose stays.

The Time Zone field while searching for UTC+5:30: the box above the list holds the search text and the list shows only the zones that are five and a half hours ahead of UTC
The search finds a city, a zone name or an offset.

Step 3: Help People Find Their Zone

If detection fails, or the visitor books on behalf of someone else, the search box takes over. It understands what people actually type. A city name finds the zone. A part of a zone name finds the zone. An offset such as UTC+5:30 finds every zone that is five and a half hours ahead of UTC right now, and GMT+7 works the same way. Press Enter and the first result is chosen.

While you search, the drop-down turns into a short list so the results are visible at once, and a hidden status message tells screen reader users how many zones were found. When a zone is chosen, the full list returns with the choice selected. If scripts are blocked, the field is simply a normal drop-down with the site zone selected, so the form always works.

Step 4: Convert the Date and Time

Storing the zone is half the job. The other half is to show your team the time in their own zone. In the field settings, switch on Convert a date and time, choose the Date field and the Time field, and decide where to convert to: the site time zone, which is the one set in Settings, General, or any other zone.

While the visitor fills in the form, a line under the field shows what you will receive, for example: 8:30 pm on 15 July in Asia/Ho_Chi_Minh is 7:30 am on 15 July in the site time zone. It is a useful check for the visitor too. If the line says something unexpected, they notice before they send the form.

When the form is sent, the conversion is made again on the server and saved as entry meta. The server does the work with PHP’s own time zone rules, so the browser does not decide what is saved.

The Parts That Usually Go Wrong

Time conversion is easy until the clocks change. Four situations are worth knowing about, and the add-on handles each of them in the same way in the browser and on the server.

  • The offset depends on the day. Ho Chi Minh City is always seven hours ahead of UTC. Denver is seven hours behind in winter and six in summer. A conversion for next January must use January’s offset, not today’s. The add-on always uses the offset of the date that was entered.
  • Clocks skip forward. On the last Sunday of March in Berlin, the clock goes from 2:00 straight to 3:00, so 2:30 does not exist. The add-on moves it forward to 3:30 as a clock would show it, and tells the visitor under the field.
  • Clocks go back. In October the same hour happens twice. The add-on uses the first one.
  • Half hours and quarter hours. India is five and a half hours ahead of UTC and Nepal is five hours and forty-five minutes ahead. Nothing special is needed, they simply work.

Behind the scenes both sides were tested against each other on thousands of conversions, including every zone around its own clock changes, so the line the visitor reads and the value you receive agree.

Step 5: Put It in the Notification

The converted value is saved with the entry, and you can print it in any notification or confirmation. The field has merge tags for the zone itself, and one more merge tag converts any date and time you point at.

<p>Zone: {Time Zone:4}</p>
<p>Offset when the form was sent: {Time Zone:4:offset}</p>
<p>In our time: {Time Zone:4:converted}</p>
<p>In Paris: {timezone_convert:2,3,target=Europe/Paris,format=full}</p>

The first line prints the zone, the second the offset as it was when the form was sent, the third the converted time in the format you set in WordPress, and the fourth converts the same date and time to Paris, with the offset and the zone name. Replace the label and the ids with those of your fields. There are also modifiers for the city, the abbreviation, an ISO date and just the date or the time.

An entry in the Gravity Forms admin: the Time Zone value Asia/Ho_Chi_Minh with its UTC offset and, under it, the converted date and time in the site time zone
The entry shows the zone with its offset and the converted time.

In the entry itself you see the zone with its offset and the converted time under it, and the entry list can show the converted value as a column. That makes it easy to sort a day of bookings in your own time.

Step 6: Show the Right Fields to the Right People

Once the zone is a field, it can drive conditional logic like any other. Show an extra question only to visitors in Europe with a rule that the zone starts with Europe/. Offer a different phone line to visitors in the Americas. Or use the offset: a rule that the zone is greater than UTC+0 matches every zone east of UTC, and a rule that the zone is UTC+7 matches every zone that is seven hours ahead right now, whatever the city. The offset rules look at the current offset of the chosen zone, so they follow daylight saving time without any extra work.

The same rules run in the browser and on the server, so a field that is hidden is never saved, even if somebody posts a value for it.

Multi-Page Forms, AJAX and Saved Forms

Long forms are often split into pages. The Time Zone field can sit on the first page, with the date and time on the second. The zone is kept when the visitor moves between pages, and the conversion uses the date and time from whichever pages they are on. AJAX forms work too: the field is set up again after every answer from the server, and the chosen zone stays.

Save and continue deserves a mention, because it is where detection can do harm. Imagine someone starts a booking on a laptop in Berlin and finishes on a phone in a taxi from Tokyo airport. The saved form comes back with the zone they chose, Europe/Berlin, and not the zone the phone is in now. The conversion is made when they finally send the form.

Accessibility and Privacy

The field is a native select, so keyboards, screen readers and mobile pickers work the way people expect. It keeps the label, the required state and the error messages that Gravity Forms gives every field, and the search box has its own accessible name. If scripts are blocked it still works.

On privacy: the zone list comes from your own server, and the zone is read in the visitor’s browser. Nothing is sent to an outside service, and nothing is stored except the identifier the visitor chose.

Tips for Better Booking Forms

  • Keep detection on and the search box on. Detection fixes most visits, and search fixes the rest.
  • Show the local time in the labels when your visitors may not know their zone name. People know what time it is.
  • Put your own most common zones in the shortlist. The site zone is always first.
  • Use the live line under the field as your confirmation. It is the cheapest check against a wrong time.
  • Print the converted time in your own notification and the visitor’s time with its zone in the confirmation message.
  • Choose a city for the site time zone in WordPress instead of a manual offset, so that your own times follow daylight saving time too.

Frequently Asked Questions

Do I need to write code?

No. Everything is set in the form editor.

Does it work with AJAX forms and multi-page forms?

Yes, with both, and with save and continue.

What is saved in the entry?

The IANA identifier of the zone, for example Europe/Paris, and, when you switch on the conversion, the converted date and time as entry meta.

Does it send data to another service?

No. The list comes from PHP and the detection is done in the browser.

A booking is only as good as the time it records. With the visitor’s zone detected, searchable and saved properly, and the conversion made for you, both sides of the call agree on when it starts.

Every visitor, on their own clock

A time zone field that detects the visitor’s zone and converts the date and time for you.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr