mirror of
https://github.com/pi-hole/web.git
synced 2026-04-20 00:39:52 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user