windows can't handle 0 timestamps
This commit is contained in:
7
main.py
7
main.py
@@ -309,8 +309,11 @@ def parse_repo(repo, repo_variant, url):
|
||||
|
||||
@app.template_filter('timestamp')
|
||||
def _jinja2_filter_timestamp(d):
|
||||
return datetime.datetime.fromtimestamp(
|
||||
int(d)).strftime('%Y-%m-%d %H:%M:%S')
|
||||
try:
|
||||
return datetime.datetime.fromtimestamp(
|
||||
int(d)).strftime('%Y-%m-%d %H:%M:%S')
|
||||
except OSError:
|
||||
return "-"
|
||||
|
||||
|
||||
@app.template_filter('filesize')
|
||||
|
||||
Reference in New Issue
Block a user