You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[LOG4J2-3805] NamedInstantPatternTest#compatibilityOfLegacyPattern fails in timezones with minute offsets (e.g., GMT+05:30) (#3888)
* [LOG4J2-3805] Skip compatibilityOfLegacyPattern test for fractional timezone offsets
The compatibilityOfLegacyPattern test fails in environments where the system
default timezone has a non-zero minute offset (e.g., Asia/Kolkata, Asia/Kathmandu).
Root cause:
- SimpleDateFormat's X pattern truncates fractional offsets (e.g., +05:30 → +05).
- DateTimeFormatter's X pattern preserves the minutes (+05:30).
Since Log4j intentionally follows DateTimeFormatter’s behavior, the test should
not assert equivalence in such environments.
This change adds an assumption to skip the test when the system timezone offset
is not a whole hour. This ensures deterministic builds for contributors in all
regions, while still verifying correctness in whole-hour zones.
Closes#3805
* LOG4J2-3885: Add test for ISO8601_OFFSET_DATE_TIME_HH with system default zone
Ensure legacy and modern formatting produce consistent results
when the system default zone offset is a whole hour.
Skip the test otherwise using assumptions.
0 commit comments