Repository navigation
STF-2206: Send second-level UTC offsets as whole minutes - #753
marselester merged 2 commits into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Jackson wrote a ZonedDateTime offset with seconds as +HH:MM:SS, for example 1971-06-01T10:00:00-00:44:30 for Africa/Monrovia. RFC 3339 has no seconds in the offset, so the web service ignored the value and returned a warning. Mapper now truncates such an offset to whole minutes and keeps the same instant. The offset stays, because the server uses it for the local time of day. All other values serialize as before. This applies to Event.time, phoneVerificationTime on Billing and Shipping, and Email.verificationTime. Fixes STF-2206. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d989024 to
92ec873
Compare
The last example in RFC 3339 section 5.8 shows an offset with seconds. It keeps the instant and uses the closest whole-minute offset. Round the offset to match it, not truncate. For example, +05:30:45 becomes +05:31, not +05:30. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes STF-2206, from the review of #724.
Jackson wrote a
ZonedDateTimeoffset with seconds as±HH:MM:SS. For example,Africa/Monroviain 1971 gave1971-06-01T10:00:00-00:44:30. RFC 3339 has no seconds in the offset, so the web service ignored the value and returned anINPUT_INVALIDwarning.Mappernow registers aZonedDateTimeserializer. If the offset has seconds, the serializer rounds the offset to the nearest minute and keeps the same instant, as in the last example in RFC 3339 section 5.8. The Monrovia example becomes1971-06-01T10:00:30-00:44. All other values serialize as before. The fix coversEvent.time,phoneVerificationTimeonBillingandShipping, andEmail.verificationTime.MapperTestcovers 6 offsets with seconds and 3 values that must not change. The 6 offset cases fail onmain.Impact is low. Since 1972, no time zone has used an offset with seconds.
🤖 Generated with Claude Code
Summary by CodeRabbit