Add timezone to date time picker

We need a user to select the timezone in addition to date and time in the date/time picker for a cross-border app.
How do we achieve this ? If not possible today, can this functionality be added to the date/time picker input element Emmanuel ?

i would have thought the best way would be when your creating the thing (data) you would add to the end of the datetimepicker :formatas - custom - users timezone.

But I don’t want it to be in the users timezone. I want a user sitting in the US to be able to schedule a call for say 4.30 pm Beijing time

i just had a look, you can have a seach box with geographic address, then user start to type place. then pick date and time, then create record with timezone as geographic place’s time zone id. now the magic is is how you send it. thats when you choose when the dattime formatted as dynamic timezone then select the current thing’s timezoneid and bingo.

Hi @jarrad
Can you possibly show this on a editor page ? I’m not sure how this can be done without extracting hours, minutes, date etc. details individually from the date/time input

@gaurav, there are good solutions to include a time and timezone picker. Here are 2 helpful posts from the forum:

Thanks @sridharan.s

@romanmg looks like the timzeone db plugin has an issue with the convert timezone call. The offset returned doesnt account for daylight saving (probably because the time parameter is currently hardcoded and set to hidden). Can you expose the time parameter and make it optional ?

i have been meaning to finish the example for you, i added the plugin UNIX Converter for that reason. it will give you local, UTC, the GMT offset and dst as a yes/no. the timestamp will be UNIX you just +:seconds to utc time to the value of the GMT offset of hr’s x 3600.

this way if you set any date/time elements to change years,days,months… so on to be 1/1/1970 00:00:00 then that +:seconds (the unix timestam) = current time then send.

so basically when “01/01/1970 00:00:00” + UTC + GMT Offset = UTC

Ah, I ended up building the convert on my end already :smiley:
Btw bubble already added the unix (:extract option in a time element). Does the plugin do something additional ?

bubbles only extracts the UNIX stamp for the last piece (ms). the plugin i put up there is free, and can convert a city name as timezone to the time there in UNIX, if you format the date as the plugin says it will convert date and time to UNIX timestamp as well and also timestamp to utc…

@gaurav I just updated the plugin with the optional Time parameter. I saw that you went an alternate route - but if you ever come back to this plugin, hopefully the update is still useful!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.