If the AI needs to write a date, its every time wrong.
Sometimes year 2021 sometimes 2023… but never my actual date..
For example if a db migration file gets created or if I want that it writes a last changed datetime in a file.
Or a Versioning with date.
Is there a solution?
yeah, i also have a tone of files with wrong date. It’s crazy to check them all.
So now I personally use a simple trick : When i ask it to modify a file, i tell it the date to implement :
“Modify the file to blabla blabla and remember today date is 2024-04-05”
1 Like
darn – I noticed that even in text content the bot is creating files that it is post 2023 dates.
I have serious concerns over what the @cursor team is doing with the agentic capabilities right now.
The agents are getting EVIL (meaning their deleting and fark-ing with code out_of_scope in such a fashion that they_are_not_your_friend fashion is shocking
I’m curious if it is possible to tell him the actual date via rule. Like “use the machines date everywhere youbare asked to use an actual date”
But it cant ne that hard for cursor devs to implement a function to get actual date…
I have this in my main rule file:
- ALWAYS get timestamp from system using:
```powershell
Get-Date -Format "yyyy-MM-dd HH:mm"
```
```bash
date "+%Y-%m-%d %H:%M"
```
it works better than nothing, but still need to remind the ai as sometimes it will just guess the date based on other lines/files in context.
In my user rule i tell it what my system/terminal is, thats why there are ps and bash examples as i use windows and linux.
1 Like
Hi Guys!! i have found a very good solution fot that problem!! MCP!
Use this MCP Server → servers/src/time at main · modelcontextprotocol/servers · GitHub
Example:
And with a rule like this, it uses the real time everytime when it needs it:
Use Real-Time for Document Timestamps
Context
-
When adding or updating timestamps in documents
-
When marking last updated dates in files
-
When recording version release dates
-
When timestamping documentation changes
-
When adding creation dates to files
Requirements
-
Always use the MCP time tool to fetch the current date/time when inserting timestamps in documents
-
Format dates consistently as YYYY-MM-DD for date-only timestamps
-
Format date and time as YYYY-MM-DD HH:MM for timestamps requiring time
-
Use time zones where appropriate, preferably using Vienna (Europe/Vienna) timezone if none specified
-
Update any existing “Last updated” or similar timestamps when making significant content changes
-
Never use hardcoded dates when dynamic dates are appropriate
Examples
# Project Documentation
*Last updated: 2023-06-15* // WRONG: Hardcoded date
# Project Documentation
*Last updated: 2024-07-07* // CORRECT: Date fetched using MCP time tool
When significant changes are made to this document, the “Last updated” date should be refreshed using the MCP time tool.
/**
* Core API for token tracking
* @version 1.2
* @lastModified June 15, 2023 // WRONG: Hardcoded date with inconsistent format
*/
/**
* Core API for token tracking
* @version 1.2
* @lastModified 2024-07-07 // CORRECT: Date fetched using MCP time tool with consistent format
*/
Specific MCP Time Tool Usage
To get the current time in a specific timezone, use:
mcp_time_get_current_time with timezone parameter (e.g., 'Europe/Vienna')
For date-only formats:
For datetime formats:
Best Practices
-
Update “Last updated” timestamps in documentation when making substantial changes
-
Use appropriate level of time precision for the context (date-only for documentation, precise timestamps for logs)
-
Consider user’s local timezone for user-facing timestamps
-
Use timezone-aware timestamps for scheduled operations or events
-
NEVER use hardcoded dates for dynamic timestamps
-
ALWAYS use MCP time tool to get the current date/time
-
ALWAYS update timestamps when making significant document changes
-
ALWAYS format dates consistently across the project