Correct podcast date format
This commit is contained in:
parent
368e7ecc9c
commit
08ea7bf7d5
6
app.py
6
app.py
|
@ -239,7 +239,7 @@ if __name__ == '__main__' or 'uwsgi' in __name__:
|
|||
"filenum":i,
|
||||
"bytes":size,
|
||||
"mbytes":round(size/1024.0/1024.0, 2),
|
||||
"date":os.path.getmtime(recordingsDir+item)
|
||||
"date":os.path.getctime(recordingsDir+item)
|
||||
})
|
||||
return allFiles
|
||||
|
||||
|
@ -266,10 +266,10 @@ if __name__ == '__main__' or 'uwsgi' in __name__:
|
|||
stream = self._getStream(id)
|
||||
# Thu, 31 Jul 2014 07:13:48 +0000
|
||||
for f in stream["files"]:
|
||||
f["date"]=datetime.fromtimestamp(f["date"]).strftime("%a, %m %b %Y %H:%M:%S +0800")
|
||||
f["date"]=datetime.fromtimestamp(f["date"]).strftime("%a, %d %b %Y %H:%M:%S +0800")
|
||||
return str.encode(render("podcast.html", {
|
||||
"stream":stream,
|
||||
"builddate": datetime.now().strftime("%a, %m %b %Y %H:%M:%S +0800")#Thu, 31 Jul 2014 07:13:48 +0000
|
||||
"builddate": datetime.now().strftime("%a, %d %b %Y %H:%M:%S +0800")#Thu, 31 Jul 2014 07:13:48 +0000
|
||||
}))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue