This is an automated email from the ASF dual-hosted git repository. humbedooh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 67b2bc3ab5fcd36d6d1b94b24d8e0f6ef5f8c274 Author: Daniel Gruno <[email protected]> AuthorDate: Wed Nov 3 20:09:40 2021 +0100 regen JS --- webui/js/ponymail.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js index cd35c6d..3bd0068 100644 --- a/webui/js/ponymail.js +++ b/webui/js/ponymail.js @@ -205,13 +205,21 @@ Number.prototype.pad = function(n) { /* Func for converting a date to YYYY-MM-DD HH:MM */ -Date.prototype.ISOBare = function() { - var M, d, h, m, y; - y = this.getFullYear(); - m = (this.getMonth() + 1).pad(2); - d = this.getDate().pad(2); - h = this.getHours().pad(2); - M = this.getMinutes().pad(2); +Date.prototype.ISOBare = function(utc = false) { + let M, d, h, m, y; + if (prefs.UTC === true) { + y = this.getUTCFullYear(); + m = (this.getUTCMonth() + 1).pad(2); + d = this.getUTCDate().pad(2); + h = this.getUTCHours().pad(2); + M = this.getUTCMinutes().pad(2); + } else { + y = this.getFullYear(); + m = (this.getMonth() + 1).pad(2); + d = this.getDate().pad(2); + h = this.getHours().pad(2); + M = this.getMinutes().pad(2); + } return y + "-" + m + "-" + d + " " + h + ":" + M; };
