fix(timezone): parse non-ISO strings as wall time in the target zone #3372
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 199 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.317
Real PR Conversation Timeline
1 comments
"Review active on #3372"
general
weight: 0.35
Ultroncn
Hi! Thanks for maintaining dayjs. I found a small bug in the timezone plugin and would love your review.
Problem (fixes #2928)
d.tz()parses every string throughdayjs.utc(input, parseFormat), but UTC mode only understands ISO-like strings — anything else falls back tonew Date(), which parses in the host's local time, and that timestamp is then treated as wall-clock time in the target zone. The result is off by the host offset:Fix
For unformatted strings without an explicit offset that fall back to the native parser, try a GMT suffix first. This keeps the host's DST rules from shifting the wall time before the target zone is applied. If the engine rejects the suffix, use the previous fallback. Strings handled by the built-in parser, explicit formats, and explicit offsets still go through
dayjs.utc().Tests