General theme: fix syntax W3C markup and add improve 'Published' date
Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user