Spaces:
Runtime error
Runtime error
Download mock-date.js from o134/Desinger-System: direct link, hf CLI and curl.
- Browser
- Download file 341 Bytes
-
https://huggingface.co/spaces/o134/Desinger-System/resolve/main/mock-date.js
- Command line
-
hf download hf://spaces/o134/Desinger-System/mock-date.js
-
curl -L -o mock-date.js https://huggingface.co/spaces/o134/Desinger-System/resolve/main/mock-date.js
341 Bytes
| import Database from 'better-sqlite3'; | |
| const db = new Database('local.db'); | |
| const pastDate = new Date(); | |
| pastDate.setMonth(pastDate.getMonth() - 1); | |
| const result = db.prepare("UPDATE tasks SET created_at = ? WHERE id = (SELECT id FROM tasks ORDER BY id ASC LIMIT 1)").run(pastDate.getTime()); | |
| console.log('Updated rows:', result.changes); | |