Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ManageSieve: Fix timeformat processing for frontend the time picker #9688

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
- Managesieve: Support :encodeurl (RFC 5435) (#8917)
- Managesieve: Add List-ID to the list of headers for creating new sieve-filters (#8307)
- Managesieve: Support an array in managesieve_host option (#9447)
- Managesieve: Fix the frontend datetime picker not respecting the 12h format and apending a dangling 's' to the seconds (#9688)
- Password: Add `ldap_samba_ad` driver (#8525)
- Password: Allow LDAP access using LDAP URI and SASL binding (#8402)
- Password: Use Guzzle HTTP Client in the `pwned` driver
Expand Down
7 changes: 5 additions & 2 deletions plugins/managesieve/managesieve.js
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -1040,6 +1041,8 @@ function sieve_formattime(hour, minutes) {
break;
case 's':
time += '00';

break;
default:
time += c;
}
Expand Down