https://retellai.com/?utm_source=discord&utm_medium=seo logo
The system is using the wrong date and year even t...
# ❓・ai-evy-support
m
@AI Evy The system is using the wrong date and year even telling the agent 100s of time it is using 202
a
Thanks for tagging me @madhav_89676. I'll look through relevant sources and get back to you shortly.
### Answer --- If your agent is giving incorrect dates, the issue is likely with how you're referencing the current date in your prompt [(1) ]() [(2) ]() [(3) ]() . Use
{{current_time}}
instead of
{{current_date}}
[(2) ]() [(3) ]() . The correct dynamic variable for date and time information is
{{current_time}}
[(2) ]() . If you've been using
{{current_date}}
or trying to manually specify dates in your prompt, switch to
{{current_time}}
[(2) ]() [(3) ]() . This is the proper dynamic variable that Retell AI provides for current date and time information [(2) ]() . Some users have also found success using external time APIs (like timeapi) for more control over time zones and formatting , but start with
{{current_time}}
first . **
​ To learn more, see the sources I considered: [[1] Discord message from @qcumbers1_cc on 2024-11-01](https://discord.com/channels/1186424376300679209/1294891368505937952/1301829519543636039) [[2] Discord message from @sanava.ai on 2024-11-01](https://discord.com/channels/1186424376300679209/1294891368505937952/1302005396730282009) [[3] Agent fails giving the current date](https://discord.com/channels/1186424376300679209/1342239628073107566) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@User The current system time is {{current time}}, which always represents the real current date and time on the system clock. We are using this
@AI Evy Are you there?
a
Thanks for the follow-up, @madhav_89676. I'll get back to you soon.
### Answer --- Yes, I'm here and ready to help with your date/time issue. I see you're using
{{current time}}
in your prompt [(1) ]() . However, the correct syntax requires an underscore, not a space . You should use:
Copy code
{{current_time}}
The
{{current_time}}
variable provides the current time in
America/Los_Angeles
timezone by default . If you need a different timezone, you can specify it using the format
{{current_time_[timezone]}}
. Common issues with date variables: 1. **Syntax error**: Using
{{current time}}
(with space) instead of
{{current_time}}
(with underscore) will cause the variable not to evaluate properly 2. **Browser caching**: Some users have reported that the date appears incorrect due to browser caching issues [(2) ]() . Try refreshing your browser or testing in a different browser (Safari vs Chrome) 3. **Test data variables**: Make sure you don't have conflicting test data variables set that might override the system time Recommended prompt structure for time-aware logic:
Copy code
# Context 
current_time : {{current_time}}
business hours :
   - Monday – Friday: 9:00 AM – 5:00 PM
   - Saturday – Sunday: Closed

If the time is not in business hours, inform the customer that we are closed and end the call using this function "end_call"
[(3) ]() Try correcting the syntax from
{{current time}}
to
{{current_time}}
and test again [(1) ]() . **
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] when using {{current_time}}, it says todays date is Jan 29th](https://discord.com/channels/1186424376300679209/1341124870922174587) [[3] Time variable?](https://discord.com/channels/1186424376300679209/1391129251356475433) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.