Skip to content

Commit

Permalink
Fix locale-aware representation of hours in Date class
Browse files Browse the repository at this point in the history
  • Loading branch information
yushroom committed Apr 16, 2023
1 parent badf38d commit 72dfd85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -48237,7 +48237,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;
}
Expand Down

0 comments on commit 72dfd85

Please sign in to comment.