diff --git a/src/entry.js b/src/entry.js index 5b4caf6..8ef096a 100644 --- a/src/entry.js +++ b/src/entry.js @@ -112,7 +112,7 @@ function extractTokenFromQuery(url) { // Generate ISO timestamp string function nowString() { - return new Date().toISOString().replace("T", " ").replace("Z", ""); + return new Date().toISOString(); } // Helper to get env var with fallback diff --git a/src/handlers/attachments.rs b/src/handlers/attachments.rs index 7aa6135..af20102 100644 --- a/src/handlers/attachments.rs +++ b/src/handlers/attachments.rs @@ -88,7 +88,7 @@ impl NumberOrString { } async fn touch_cipher_updated_at(db: &D1Database, cipher_id: &str) -> Result<(), AppError> { - let now = Utc::now().format("%Y-%m-%dT%H:%M:%S%.3fZ").to_string(); + let now = now_string(); query!( db, "UPDATE ciphers SET updated_at = ?1 WHERE id = ?2",