On Mon, 25 May 2026 15:11:22 GMT, Sruthy Jayan <[email protected]> wrote:
>> Modern AIX7+ supports full POSIX TZ format (e.g., >> TZ=CET-1CEST,M3.5.0,M10.5.0), but the current implementation in >> mapPlatformToJavaTimezone() searches the tzmappings file using the complete >> string including DST transition rules. The tzmappings file only contains the >> base timezone identifier (e.g., CET-1CEST), causing the lookup to fail and >> fall back to GMT offset calculation. >> >> This behavior differs from earlier AIX versions and IBM Java 8, which >> truncated the TZ string at the first comma before performing the lookup, >> successfully mapping to proper IANA timezone IDs. >> >> >> Fix include the below : >> Refactor the AIX timezone mapping implementation to support both modern and >> legacy POSIX TZ formats: >> >> Extract mapping logic into new getJavaTimezoneFromPlatform() helper function >> Implement two-phase lookup strategy: >> Phase 1: Attempt to map the full POSIX TZ string (supports modern AIX7+) >> Phase 2: If no match, truncate at first comma and retry (maintains backward >> compatibility) >> Fall back to GMT offset only if both lookups fail >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Sruthy Jayan has updated the pull request incrementally with one additional > commit since the last revision: > > Removed extra whitespaces > > Signed-off-by: Sruthy Jayan <[email protected]> Could you explain why the test had to be changed to exclude AIX from comparing the explicit DST rules in TZ? The redo of the native code appears to be exactly the same as the backed-out change, so I am not sure this actually addresses the regression that caused the backout. In particular, the updated test seems to accept the AIX mapping result instead of verifying that the explicit DST rules in TZ are honored. Also, the PR title should reflect the JBS issue title. ------------- PR Comment: https://git.openjdk.org/jdk/pull/31270#issuecomment-4558482758
