commit 8cdb919ed9b9b56c66c91ca56ae0c8217dd36cc5
parent f212a4513e6fcefedde993207e44a1ff953e34c0
Author: Fabrice Bellard <fabrice@bellard.org>
Date: Mon, 8 Jan 2024 19:02:30 +0100
fixed Date.toLocaleString() (kuzmas)
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/quickjs/quickjs.c b/quickjs/quickjs.c
@@ -49690,7 +49690,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;
}