From: Fabrice Bellard Date: Mon, 8 Jan 2024 18:02:30 +0000 (+0100) Subject: fixed Date.toLocaleString() (kuzmas) X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/postgres_fdw.c?a=commitdiff_plain;h=e1e65aca9193b8f014bccf88484db4f410a05376;p=quickjs.git fixed Date.toLocaleString() (kuzmas) --- diff --git a/quickjs.c b/quickjs.c index a09781b..a6cab1d 100644 --- a/quickjs.c +++ b/quickjs.c @@ -49472,7 +49472,7 @@ static JSValue get_date_string(JSContext *ctx, JSValueConst this_val, break; case 3: pos += snprintf(buf + pos, sizeof(buf) - pos, - "%02d:%02d:%02d %cM", (h + 1) % 12 - 1, m, s, + "%02d:%02d:%02d %cM", (h + 11) % 12 + 1, m, s, (h < 12) ? 'A' : 'P'); break; }