Managesieve: fix 12h format in sieve_formattime()

This commit is contained in:
Bennet Becker
2024-11-04 10:05:59 +01:00
parent a4e50e3961
commit 5734dd935b

View File

@@ -1022,8 +1022,9 @@ function sieve_formattime(hour, minutes) {
break;
case 'g':
case 'h':
h = hour == 0 ? 12 : hour > 12 ? hour - 12 : hour;
time += (c == 'h' && hour < 10 ? '0' : '') + hour;
h = hour % 12;
h = h === 0 ? 12 : h;
time += (c === 'h' && h < 10 ? '0' : '') + h;
break;
case 'G':