Fix interpretation of lease expiration field in case it is 0. This does not mean 1st of January 1970 but really a never expiring lease

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2024-01-26 16:22:11 +01:00
parent 32a1954bfa
commit c480e0343d

View File

@@ -152,6 +152,10 @@ function showAlert(type, icon, title, message) {
}
function datetime(date, html, humanReadable) {
if (date === 0 && humanReadable) {
return "Never";
}
var format = html === false ? "Y-MM-DD HH:mm:ss z" : "Y-MM-DD [<br class='hidden-lg'>]HH:mm:ss z";
var timestr = moment.unix(Math.floor(date)).format(format).trim();
return humanReadable