[GH-ISSUE #2907] [BUG]: Agent Skill Datetime shows wrong data #1850

Closed
opened 2026-02-22 18:26:49 -05:00 by yindo · 1 comment
Owner

Originally created by @plasi7 on GitHub (Dec 27, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2907

How are you running AnythingLLM?

Docker (local)

What happened?

The plugin to get current date and time in formatted strings doesn't work right. By asking the chatbot a question about the current date, it answers wrong.

Are there known steps to reproduce?

No response

Originally created by @plasi7 on GitHub (Dec 27, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2907 ### How are you running AnythingLLM? Docker (local) ### What happened? The plugin to get current date and time in formatted strings doesn't work right. By asking the chatbot a question about the current date, it answers wrong. ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:26:49 -05:00
yindo closed this issue 2026-02-22 18:26:49 -05:00
Author
Owner

@timothycarambat commented on GitHub (Dec 28, 2024):

const now = new Date();

      const dateOptions = {
        weekday: 'long',
        year: 'numeric',
        month: 'long',
        day: 'numeric'
      };
      const currentDate = now.toLocaleDateString('en-US', dateOptions);

      const timeOptions = {
        hour: '2-digit',
        minute: '2-digit',
        second: '2-digit',
        hour12: false
      };
      const currentTime = now.toLocaleTimeString('en-US', timeOptions);

      return JSON.stringify({
        date: `Today's date is ${currentDate}`,
        time: `Current Time: ${currentTime}`
      });

Its runs new Date directly, you'll need more evidence to support why or how it is wrong as the comment does not explain how it is wrongl

@timothycarambat commented on GitHub (Dec 28, 2024): ``` const now = new Date(); const dateOptions = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; const currentDate = now.toLocaleDateString('en-US', dateOptions); const timeOptions = { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }; const currentTime = now.toLocaleTimeString('en-US', timeOptions); return JSON.stringify({ date: `Today's date is ${currentDate}`, time: `Current Time: ${currentTime}` }); ``` Its runs `new Date` directly, you'll need more evidence to support why or how it is wrong as the comment does not explain how it is wrongl
yindo changed title from [BUG]: Agent Skill Datetime shows wrong data to [GH-ISSUE #2907] [BUG]: Agent Skill Datetime shows wrong data 2026-06-05 14:43:03 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1850