Skip to content

fix(agent): inject current datetime as ISO 8601 (was DD/MM, misread as MM/DD)#29

Merged
gomessguii merged 1 commit into
developfrom
guilhermegomes/fix-agent-datetime-iso
Jul 11, 2026
Merged

fix(agent): inject current datetime as ISO 8601 (was DD/MM, misread as MM/DD)#29
gomessguii merged 1 commit into
developfrom
guilhermegomes/fix-agent-datetime-iso

Conversation

@gomessguii

Copy link
Copy Markdown
Member

Agente injeta a data atual como ISO 8601 (era DD/MM, LLM lia como MM/DD)

Bug: o agente recebe a data atual num bloco system-data (Current datetime: ...) e na var de template {current_datetime}, ambos formatados como %d/%m/%Y. Uma LLM lê 11/07/2026 como MM/DD → 7 de novembro, em vez de 11 de julho. Resultado: pedir "agende pra amanhã" hoje (11/jul) criava evento pra 8/nov.

Fix: emitir ISO 8601 (YYYY-MM-DD HH:MM), e no system-data incluir o dia da semana, pra a ordem dia/mês ser inequívoca:

  • src/services/adk/agents/llm_agent_builder.py:626 (var {current_datetime})
  • :1017 (bloco system-data injetado em todo agente)

Descoberto testando o agendamento via Google Calendar no agente.

…s MM/DD)

The agent's injected "Current datetime" system-data (and the {current_datetime}
template var) used %d/%m/%Y, so an LLM read e.g. 11/07/2026 as MM/DD -> Nov 7
instead of Jul 11, scheduling calendar events on the wrong day. Emit ISO 8601
(YYYY-MM-DD HH:MM) + weekday so day/month order is unambiguous.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @gomessguii, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@gomessguii gomessguii merged commit b4d4ff9 into develop Jul 11, 2026
4 checks passed
@gomessguii gomessguii deleted the guilhermegomes/fix-agent-datetime-iso branch July 11, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant