feat: use all available time zone names in CurrentDateComponent (#5797)
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
This commit is contained in:
parent
7f6b924f9c
commit
c1cec32d9e
1 changed files with 2 additions and 36 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from zoneinfo import ZoneInfo
|
from zoneinfo import ZoneInfo, available_timezones
|
||||||
|
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
|
|
@ -18,41 +18,7 @@ class CurrentDateComponent(Component):
|
||||||
DropdownInput(
|
DropdownInput(
|
||||||
name="timezone",
|
name="timezone",
|
||||||
display_name="Timezone",
|
display_name="Timezone",
|
||||||
options=[
|
options=list(available_timezones()),
|
||||||
"UTC",
|
|
||||||
"US/Eastern",
|
|
||||||
"US/Central",
|
|
||||||
"US/Mountain",
|
|
||||||
"US/Pacific",
|
|
||||||
"Europe/London",
|
|
||||||
"Europe/Paris",
|
|
||||||
"Europe/Berlin",
|
|
||||||
"Europe/Moscow",
|
|
||||||
"Asia/Tokyo",
|
|
||||||
"Asia/Shanghai",
|
|
||||||
"Asia/Singapore",
|
|
||||||
"Asia/Dubai",
|
|
||||||
"Australia/Sydney",
|
|
||||||
"Australia/Melbourne",
|
|
||||||
"Pacific/Auckland",
|
|
||||||
"America/Sao_Paulo",
|
|
||||||
"America/Mexico_City",
|
|
||||||
"America/Toronto",
|
|
||||||
"America/Vancouver",
|
|
||||||
"Africa/Cairo",
|
|
||||||
"Africa/Johannesburg",
|
|
||||||
"Atlantic/Reykjavik",
|
|
||||||
"Indian/Maldives",
|
|
||||||
"America/Bogota",
|
|
||||||
"America/Lima",
|
|
||||||
"America/Santiago",
|
|
||||||
"America/Buenos_Aires",
|
|
||||||
"America/Caracas",
|
|
||||||
"America/La_Paz",
|
|
||||||
"America/Montevideo",
|
|
||||||
"America/Asuncion",
|
|
||||||
"America/Cuiaba",
|
|
||||||
],
|
|
||||||
value="UTC",
|
value="UTC",
|
||||||
info="Select the timezone for the current date and time.",
|
info="Select the timezone for the current date and time.",
|
||||||
tool_mode=True,
|
tool_mode=True,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue