pantheon-opencode 1.1.1-beta.12 → 1.1.1-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ import argparse
|
|
|
15
15
|
import re
|
|
16
16
|
import sqlite3
|
|
17
17
|
import sys
|
|
18
|
-
from datetime import
|
|
18
|
+
from datetime import datetime, timedelta, timezone
|
|
19
19
|
from pathlib import Path
|
|
20
20
|
|
|
21
21
|
from _pantheon_paths import pantheon_home, pantheon_project
|
|
@@ -148,7 +148,7 @@ def _write_deletelog(db_path: Path, count: int, keys: list[str]) -> None:
|
|
|
148
148
|
log_path = db_path.with_name(db_path.name + ".deletelog")
|
|
149
149
|
_rotate_deletelog(log_path)
|
|
150
150
|
|
|
151
|
-
timestamp = datetime.now(
|
|
151
|
+
timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
|
152
152
|
keys_str = ",".join(keys)
|
|
153
153
|
with open(log_path, "a", encoding="utf-8") as f:
|
|
154
154
|
f.write(f"[{timestamp}] PURGED={count} KEYS=[{keys_str}]\n")
|
|
@@ -208,7 +208,7 @@ async def kv_store(
|
|
|
208
208
|
conn = _db(scope)
|
|
209
209
|
expires_at: str | None = None
|
|
210
210
|
if ttl is not None:
|
|
211
|
-
expires_at = (datetime.now(
|
|
211
|
+
expires_at = (datetime.now(timezone.utc) + timedelta(seconds=ttl)).isoformat()
|
|
212
212
|
|
|
213
213
|
conn.execute(
|
|
214
214
|
"INSERT INTO kv_store (namespace, key, value, expires_at, "
|
|
@@ -14,7 +14,7 @@ import argparse
|
|
|
14
14
|
import re
|
|
15
15
|
import sqlite3
|
|
16
16
|
import sys
|
|
17
|
-
from datetime import
|
|
17
|
+
from datetime import datetime, timedelta, timezone
|
|
18
18
|
from pathlib import Path
|
|
19
19
|
|
|
20
20
|
from _pantheon_paths import pantheon_home, pantheon_project
|
|
@@ -147,7 +147,7 @@ def _write_deletelog(db_path: Path, count: int, keys: list[str]) -> None:
|
|
|
147
147
|
log_path = db_path.with_name(db_path.name + ".deletelog")
|
|
148
148
|
_rotate_deletelog(log_path)
|
|
149
149
|
|
|
150
|
-
timestamp = datetime.now(
|
|
150
|
+
timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
|
151
151
|
keys_str = ",".join(keys)
|
|
152
152
|
with open(log_path, "a", encoding="utf-8") as f:
|
|
153
153
|
f.write(f"[{timestamp}] PURGED={count} KEYS=[{keys_str}]\n")
|
|
@@ -207,7 +207,7 @@ async def kv_store(
|
|
|
207
207
|
conn = _db(scope)
|
|
208
208
|
expires_at: str | None = None
|
|
209
209
|
if ttl is not None:
|
|
210
|
-
expires_at = (datetime.now(
|
|
210
|
+
expires_at = (datetime.now(timezone.utc) + timedelta(seconds=ttl)).isoformat()
|
|
211
211
|
|
|
212
212
|
conn.execute(
|
|
213
213
|
"INSERT INTO kv_store (namespace, key, value, expires_at, "
|