mirror of https://github.com/kf7eel/hbnet
update timestamp unit table
This commit is contained in:
parent
348e54d1f1
commit
e7ecd35865
|
|
@ -6608,6 +6608,7 @@ Name: <strong>''' + p.name + '''</strong> - Port: <strong>''' + str(
|
|||
@app.route('/unit/<server>')
|
||||
def get_unit_table(server):
|
||||
unit_table = Misc.query.filter_by(field_1='unit_table_' + server).first()
|
||||
svr = ServerList.query.filter_by(name=server).first()
|
||||
table_dict = ast.literal_eval(unit_table.field_2)
|
||||
print(table_dict)
|
||||
content = '''
|
||||
|
|
@ -6631,7 +6632,7 @@ Name: <strong>''' + p.name + '''</strong> - Port: <strong>''' + str(
|
|||
<tr>
|
||||
<td>''' + str(int_id(i[0])) + '''</td>
|
||||
<td>''' + str((i[1][0])) + '''</td>
|
||||
<td>''' + str((datetime.datetime.fromtimestamp(i[1][1]) + timedelta(hours=hbnet_tz)).strftime(time_format)) + '''</td>
|
||||
<td>''' + str((svr.unit_time + datetime.datetime.fromtimestamp(i[1][1]) + timedelta(hours=hbnet_tz)).strftime(time_format)) + '''</td>
|
||||
</tr>
|
||||
'''
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue