I want to get the timezone of a country, so I have a dropdown with a list of iso code countries and I want to call the TimeZoneDB API by the country code as a parameter and get the result in a text :
the param fields is only telling the api which field values to return, it is not for filtering…for filtering call the api call and use the operator filtered to filter by country…if you have a premium account on timezone db you can filter by city or ip address, but that is a different plugin api call, not list of zones but specific zone
I’m developing an international app to manage appointements so I have to work with date&time and timezones.
When a customer consults the professional’s schedules, the current date has to be the current date in the professional’s timezone.
So I added a field timezone in user profil. We suggest him the timezone of his country but he can update it at any time.
Now, I need to convert date into the timezone of the pro when the client is scheduling an appointement. So I tried current date : formatted as … but it becomes a text !
Okay, that sounds good, I’m glad you got a resolution that works for you.
If you are interested, you can check out my free template that has built in functionality for bookings with timezone and daylight savings aware.
In the video below I demonstrate a booking and how the users current timezone is detected and populated by default, but while selecting their desired timeslot, they can choose to change their timezone and the selected date and available timeslots displays are updated to reflect that newly selected timezone.
In the video I also demonstrate the day light savings aware. In my timezone, Asia/Bangkok, we do not follow daylight savings. In NYC it falls around March 9th this year, so I select March 7 and then March 14 to demonstrate the difference in the America/New_York timezone due to the day light savings change.