General theme: fix syntax W3C markup and add improve 'Published' date

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
Jesús
2020-12-30 16:17:48 -05:00
parent 056c3be3f2
commit 1f4d7cc958
5 changed files with 14 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
from datetime import datetime
import settings
import socks
import sockshandler
@@ -607,3 +608,9 @@ def strip_non_ascii(string):
''' Returns the string without non ASCII characters'''
stripped = (c for c in string if 0 < ord(c) < 127)
return ''.join(stripped)
def time_utc_isoformat(string):
t = datetime.strptime(string, '%Y-%m-%d')
t = t.astimezone().isoformat()
return t