diff --git a/nyaa/models.py b/nyaa/models.py index 1f1ba10..cc19114 100644 --- a/nyaa/models.py +++ b/nyaa/models.py @@ -606,6 +606,11 @@ class User(db.Model): '''Account age in seconds''' return (datetime.utcnow() - self.created_time).total_seconds() + @property + def created_utc_timestamp(self): + ''' Returns a UTC POSIX timestamp, as seconds ''' + return (self.created_time - UTC_EPOCH).total_seconds() + class AdminLogBase(DeclarativeHelperBase): __tablename_base__ = 'adminlog' diff --git a/nyaa/templates/user.html b/nyaa/templates/user.html index 0de97d3..8526c34 100644 --- a/nyaa/templates/user.html +++ b/nyaa/templates/user.html @@ -24,7 +24,7 @@
User ID:
{{ user.id }}
Account created on:
-
{{ user.created_time }}
+
{{ user.created_time.strftime('%Y-%m-%d %H:%M UTC') }}
Email address:
{{ user.email }}
User class: