https://retellai.com/?utm_source=discord&utm_medium=seo logo
what is the current time variable for like let's s...
# ❓・ai-evy-support
h
@AI Evy what is the current time variable for like let's see if it's dynamic like the users time zone like if it extracts view a tool users time zone how do I get that to be put into like a variable for the LLM to internally recognizing what the time is for them?
a
Thanks for tagging me @hans_70884. I'll look through relevant sources and get back to you shortly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
### Answer Retell AI provides system default dynamic variables for time that you can use in your prompts. [(1) ]() [(2) ]() For a static timezone, use
{{current_time_[timezone]}}
. For example,
{{current_time_Australia/Sydney}}
or
{{current_time_America/New_York}}
. If you need to dynamically determine the user's timezone (for example, by extracting it through a custom tool or function) , you can use nested variables. [(1) ]() Here's how it works: First, store the user's timezone in a custom variable like
{{my_timezone}}
. Then use the nested syntax
{{current_time_{{my_timezone}}}}
. This evaluates in two steps: 1.
{{current_time_{{my_timezone}}}}
becomes
{{current_time_America/Los_Angeles}}
(if
my_timezone
was set to
America/Los_Angeles
) 2. Then it evaluates to the actual current time in that timezone The
{{current_time}}
variable defaults to
America/Los_Angeles
timezone and returns a format like "Monday, March 24, 2025 at 02:53:01 PM PDT". [(1) ]() [(2) ]() **
h
{{current_time_{{user_timezone}}}} @AI Evy so I've got a question if I currently have a tool which_so the name of the tools are user_time zone so I guess like is this variable accurate? Is this variable going to do? Is this usable?
a
Thanks for the follow-up, @hans_70884. I'll get back to you soon.
### Answer --- Yes,
{{current_time_{{user_timezone}}}}
is the correct syntax for nested variables in Retell AI. [(1) ]() Here's how it works: 1. Your tool (named
user_timezone
) would need to set a dynamic variable with the timezone value (e.g.,
America/New_York
,
Europe/London
, etc.) 2. When you use
{{current_time_{{user_timezone}}}}
, Retell evaluates it in two steps: - First:
{{user_timezone}}
resolves to the actual timezone string (e.g.,
America/New_York
) - Second:
{{current_time_America/New_York}}
evaluates to the actual current time in that timezone The format returned will be something like "Monday, March 24, 2025 at 02:53:01 PM PDT". [(1) ]() [(2) ]() Important: Make sure your tool is actually setting the
user_timezone
dynamic variable with a valid IANA timezone identifier (like
America/Los_Angeles
,
Europe/London
, etc.) . The nested variable syntax only works if
user_timezone
contains a valid timezone string. [(1) ]() Note: There have been some reported issues with timezone variables not always evaluating reliably in certain contexts. [(3) ]() If you encounter inconsistent behavior, test thoroughly in both Logic Split Nodes and Conversation Nodes.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[3] {{current_time_[timezone]}} not working as it should](https://discord.com/channels/1186424376300679209/1440290767170965685) ​