ramanathan1504 opened a new issue, #3885:
URL: https://github.com/apache/logging-log4j2/issues/3885
### Description
The `compatibilityOfLegacyPattern` test in `NamedInstantPatternTest` fails
when the build is run in an environment with a timezone that has a non-zero
minute offset, such as India Standard Time (GMT+05:30).
The test asserts that a legacy date formatter and a new formatter produce
identical output. For the `ISO8601_OFFSET_DATE_TIME_HH` enum value, the legacy
formatter produces a timezone offset with minutes (e.g., `+0530`), while the
new formatter produces an offset with only hours (e.g., `+05`), causing the
assertion to fail.
This was discovered while working on PR #3874.
### Configuration
* **Version:** `2.26.0-SNAPSHOT`
* **Operating system:** `[macOS 26]`
* **JDK:** `[OpenJDK 17.0.5]`
* **Timezone:** `GMT+05:30 (e.g., Asia/Kolkata)`
### Logs
```
[INFO] Running org.apache.logging.log4j.core.pattern.NamedInstantPatternTest
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
0.123 s <<< FAILURE! - in
org.apache.logging.log4j.core.pattern.NamedInstantPatternTest
[ERROR]
compatibilityOfLegacyPattern(org.apache.logging.log4j.core.pattern.NamedInstantPattern)
Time elapsed: 0.1 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
[Compatibility failed for pattern: 'ISO8601_OFFSET_DATE_TIME_HH']
expected: "2025-08-17T12:10:08,887+0530"
but was: "2025-08-17T12:10:08,887+05"
at
org.apache.logging.log4j.core.pattern.NamedInstantPatternTest.compatibilityOfLegacyPattern(NamedInstantPatternTest.java:45)
```
### Reproduction
1. Set the local machine's system timezone to one with a 30 or 45-minute
offset. For example, `Asia/Kolkata` (India Standard Time, GMT+05:30).
2. Check out the `main` branch of the `logging-log4j2` repository.
3. Run the build with `mvn clean install`.
4. Observe the build failure in the `log4j-core-test` module, originating
from `NamedInstantPatternTest`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]