From 5ccf2b593f5deebb219cc36f1a089c3238ba82fe Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 23 Mar 2024 21:57:17 +0000 Subject: Dates --- model.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'model.py') diff --git a/model.py b/model.py index b4147e1..b4e0b1c 100644 --- a/model.py +++ b/model.py @@ -17,6 +17,10 @@ def bootstrap_db(db): class Page(object): + @classmethod + def now(cls): + return datetime.utcnow().isoformat(sep=" ", timespec="seconds") + def __init__( self, name="WikiHome", @@ -26,7 +30,7 @@ class Page(object): updated_at=None, history=False, ): - now = datetime.utcnow() + now = Page.now() if updated_at is None: updated_at = now -- cgit v1.2.3