Closed deadcoder0904 closed 2 years ago
kinda like this select → https://ndom91.github.io/react-timezone-select/
also, would love to see how u use it in your application (a screenshot, maybe)?
think i've got it.
const timezones = getTimeZones()
const options = timezones.map(({ name, currentTimeFormat }) => {
const label = `(GMT${currentTimeFormat.substring(0, 6)}) ${name.replace(/_/g, ' ')}`
return { label, value: name }
})
for example, my timezone
asia/kolkata
has agmt +5:30
. i was wondering how do i get the gmt value as it is useful while displaying?