Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Timezone selector based on city

Avatar

Level 3

Hi,

Is there any OOTB component for selecting timezones? 

I need to detect the timezone of a particular city. The city name is entered through a textfield.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi,

As commented out earlier , we don't have OOTB component for timezone selector.

By googling found that it will be hard to get citywise time details as opposed to countrywise

Please see below for some tips,

http://stackoverflow.com/questions/19783249/getting-time-zone-when-entering-state-and-country-time-z...
http://stackoverflow.com/questions/6934757/what-is-the-best-way-of-getting-the-timezone-from-the-cit...

Examples:

https://github.com/dosx/timezone-picker

Detecting and working with timezones in PHP in browser
https://github.com/tamaspap/timezones


Google Api:
https://developers.google.com/maps/documentation/timezone/

-Thanks

View solution in original post

3 Replies

Avatar

Level 10

I think there is nothing OOTB available to get timezones for a given city. You can use some existing APIs and create a custom component

Avatar

Correct answer by
Level 2

Hi,

As commented out earlier , we don't have OOTB component for timezone selector.

By googling found that it will be hard to get citywise time details as opposed to countrywise

Please see below for some tips,

http://stackoverflow.com/questions/19783249/getting-time-zone-when-entering-state-and-country-time-z...
http://stackoverflow.com/questions/6934757/what-is-the-best-way-of-getting-the-timezone-from-the-cit...

Examples:

https://github.com/dosx/timezone-picker

Detecting and working with timezones in PHP in browser
https://github.com/tamaspap/timezones


Google Api:
https://developers.google.com/maps/documentation/timezone/

-Thanks

Avatar

Level 3

I searched for UTC timezones in OOTB compoents, but couldn't find. Can you help me find one?