summaryrefslogtreecommitdiff
path: root/quickjs.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2024-01-08 19:02:30 +0100
committerFabrice Bellard <fabrice@bellard.org>2024-01-08 19:02:30 +0100
commite1e65aca9193b8f014bccf88484db4f410a05376 (patch)
treecb75f4567546a81b150ae8fe7cf5376143b1ee51 /quickjs.c
parentaf308614a8b89e80a6e6a3f270292ef724931d1e (diff)
downloadquickjs-e1e65aca9193b8f014bccf88484db4f410a05376.tar.gz
quickjs-e1e65aca9193b8f014bccf88484db4f410a05376.zip
fixed Date.toLocaleString() (kuzmas)
Diffstat (limited to 'quickjs.c')
-rw-r--r--quickjs.c2
1 files changed, 1 insertions, 1 deletions
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;
}