Maked last update time human-readable

This commit is contained in:
Halhadus 2024-12-07 01:02:29 +03:00
parent 1fecedbbb3
commit a0efdb1d79

View file

@ -41,8 +41,7 @@ def generatehtmlcode(url):
html += '<meta property="og:url" content="https://halhadus.rocks/localwrapped.html">\n'
html += '<h1>Halhadus\' Local Wrapped</h1>\n'
html += '<h2>Total Play Time: ' + str(int(total_play_time(url)/60)) + ' minutes</h2>\n'
# HUMAN READABLE last updated time (example: 2021-09-01 12:34:56) of assets/localwrapped/music.db (UTC +3)
html += '<h2>Last Updated: ' + datetime.datetime.utcfromtimestamp(os.path.getmtime("assets/localwrapped/music.db")).strftime('%Y-%m-%d %H:%M:%S') + ' (UTC +3)</h2>\n'
html += '<h2>Last Updated: ' + datetime.datetime.utcfromtimestamp(os.path.getmtime("assets/localwrapped/music.db")).strftime('%Y-%m-%d %H:%M:%S') + ' (server time)</h2>\n'
html += '<h3>Most Played Musics</h3>\n'
html += '<ol>\n'
count_list_formatted = []