https://retellai.com/?utm_source=discord&utm_medium=seo logo
Current Time AwarenessSet the agent's timezone so ...
# ❓・ai-evy-support
a
Thanks for tagging me @Vyyy. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can pass timezone information dynamically using Retell AI's system default dynamic variables. [(1) ]() Retell provides timezone-aware dynamic variables that you can use in your agent prompts: -
{{current_time}}
- Current time in
America/Los_Angeles
-
{{current_time_[timezone]}}
- Current time in a specified timezone, for example:
{{current_time_Australia/Sydney}}
-
{{current_hour}}
- Current hour as a fraction in
America/Los_Angeles
-
{{current_hour_[timezone]}}
- Current hour as a fraction in specified timezone -
{{current_calendar}}
- 14-day calendar in
America/Los_Angeles
-
{{current_calendar_[timezone]}}
- 14-day calendar in specified timezone To dynamically set the timezone, you can use nested variables. For example:
Copy code
{{current_time_{{my_timezone}}}}
If you set
my_timezone
to
America/Los_Angeles
, this evaluates to
{{current_time_America/Los_Angeles}}
first, then resolves to the actual time. You can pass the
my_timezone
variable when creating a call using the
retell_llm_dynamic_variables
field in the Create Phone Call API. [(1) ]() [(2) ]() In your agent prompt, include the current time reference so the agent understands temporal context. For example: "Now is {{current_time_{{timezone}}}}. Add X hours to make it our timezone". [(3) ]()
​ To learn more, see the sources I considered: [[1] Dynamic variables: personalize Retell agent calls](https://docs.retellai.com/build/dynamic-variables) [[2] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[3] Discord message from @eviewang_ on 2025-03-03](https://discord.com/channels/1186424376300679209/1186462578310910112/1346027640208756767) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@User so i can sat {{my_timezone}} is est in the agent?
@AI Evy so i can sat {{my_timezone}} is est in the agent?
a
Thanks for the follow-up, @Vyyy. I'll get back to you soon.
### Answer You can set default dynamic variables at the agent level, including
{{my_timezone}}
. [(1) ]() To set a default timezone for your agent: 1. Configure agent-level default dynamic variables in your agent settings 2. Set
my_timezone
to your desired timezone (like
America/New_York
for EST) Then use nested variables in your prompts:
Copy code
{{current_time_{{my_timezone}}}}
This evaluates to
{{current_time_America/New_York}}
and then resolves to the actual time. Important: Use IANA timezone identifiers (like
America/New_York
) rather than abbreviations like "EST", as the system variables expect full timezone names like
America/Los_Angeles
or
Australia/Sydney
. For production calls, you can override the agent-level default by passing
my_timezone
in the
retell_llm_dynamic_variables
field when creating a call. [(1) ]() [(2) ]() Agent-level defaults only apply when specific variables aren't included in the call request. [(1) ]()
​ To learn more, see the sources I considered: [[1] Dynamic variables: personalize Retell agent calls](https://docs.retellai.com/build/dynamic-variables) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy {{my_timezone}} is {{current_time_{{America/New_York}}}}​ correct setup?
a
Thanks for the follow-up, @Vyyy. I'll get back to you soon.
### Answer No, that setup isn't correct. You're mixing two different approaches. [(1) ]() Option 1: Use the system variable directly If you want to reference the current time in New York timezone, use:
Copy code
{{current_time_America/New_York}}
Option 2: Use nested variables for dynamic timezone If you want to set
my_timezone
as a variable that can be changed per call, set it up like this: 1. Set
my_timezone
to
America/New_York
(just the timezone name, not the full expression) 2. In your prompt, reference it as:
Copy code
{{current_time_{{my_timezone}}}}
This evaluates in two steps: first
{{my_timezone}}
becomes
America/New_York
, then
{{current_time_America/New_York}}
resolves to the actual time. Your error: You're trying to assign
{{current_time_{{America/New_York}}}}
to
{{my_timezone}}
, which creates invalid nested syntax. The variable
my_timezone
should contain only the timezone identifier string (like
America/New_York
) , not the full time expression.
​ To learn more, see the sources I considered: [[1] Dynamic variables: personalize Retell agent calls](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy i basically want to put it in my system prompt that my currnet agent timezone is central time. what do i put in the global prompt for testing and then i can dynamically pass it
a
Thanks for the follow-up, @Vyyy. I'll get back to you soon.
### Answer For testing in your global prompt with Central Time, add this: [(1) ]()
Copy code
The current time is {{current_time_America/Chicago}}. Use this as your reference for all time-related conversations.
For dynamic timezone support that you can override per call, use this approach: Step 1: Set agent-level default In your agent's default dynamic variables, set: - Variable name:
my_timezone
- Value:
America/Chicago
Step 2: Reference it in your global prompt:
Copy code
The current time is {{current_time_{{my_timezone}}}}. Use this as your reference for all time-related conversations.
This nested variable syntax first resolves
{{my_timezone}}
to
America/Chicago
, then evaluates
{{current_time_America/Chicago}}
to the actual time. Step 3: Override dynamically per call When creating calls via API, pass different timezones in `retell_llm_dynamic_variables`:
Copy code
json
{
  "my_timezone": "America/New_York"
}
The agent-level default (
America/Chicago
) only applies when you don't provide
my_timezone
in the call request.
​ To learn more, see the sources I considered: [[1] Dynamic variables: personalize Retell agent calls](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
{ "from_number": "+14328887928", "to_number": "+14074888682", "override_agent_id": "agent_fd7f7da2e78727ae2f59d2caaa", "agent_override.agent.timezone" : "America/Chicago" } okay?
@AI Evy { "from_number": "+14328887928", "to_number": "+14074888682", "override_agent_id": "agent_fd7f7da2e78727ae2f59d2caaa", "agent_override.agent.timezone" : "America/Chicago" } okay?
a
Thanks for the follow-up, @Vyyy. I'll get back to you soon.
### Answer No, that's not the correct structure. You have two separate issues: [(1) ]() Issue 1: Wrong field name
agent_override.agent.timezone
is not a dynamic variable field. The
timezone
field is part of the agent configuration itself, not how you pass dynamic timezone values per call. Issue 2: Wrong structure for agent_override If you want to use
agent_override
, the structure should be nested objects, not dot notation. Correct approach for dynamic timezone:
Copy code
json
{
  "from_number": "+14328887928",
  "to_number": "+14074888682",
  "override_agent_id": "agent_fd7f7da2e78727ae2f59d2caaa",
  "retell_llm_dynamic_variables": {
    "my_timezone": "America/Chicago"
  }
}
[(2) ]() [(1) ]() This passes
my_timezone
as a dynamic variable that your prompt can reference using
{{current_time_{{my_timezone}}}}
. [(2) ]() Alternative: Set agent timezone directly in agent_override If you want to override the agent's timezone setting itself (not as a dynamic variable) , use:
Copy code
json
{
  "from_number": "+14328887928",
  "to_number": "+14074888682",
  "override_agent_id": "agent_fd7f7da2e78727ae2f59d2caaa",
  "agent_override": {
    "agent": {
      "timezone": "America/Chicago"
    }
  }
}
[(1) ]() The first approach (using
retell_llm_dynamic_variables
) is recommended for your use case since you want to dynamically pass timezone per call. [(2) ]() [(1) ]() **
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[2] Dynamic variables: personalize Retell agent calls](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.