[Java 25 / Lucee 7.1] Startup stderr warnings: Deprecated three-letter time zone ID lookup (ZoneId.SHORT_IDS)

Hi all,

While testing Lucee 7.1.x on Java 25 (Eclipse Temurin JDK 25 on Tomcat 11), we are noticing a burst of 28 deprecation warnings emitted to stderr during startup / engine warmup:

WARNING: Use of the three-letter time zone ID "PRT" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "CTT" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "SST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "MST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "AST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "NST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "HST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "ACT" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "BST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "AET" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "IST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "CST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "NET" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "AGT" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "CAT" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "MIT" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "BET" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "PST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "ART" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "JST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "VST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "IET" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "CNT" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "PLT" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "PNT" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "EST" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "EAT" is deprecated and it will be removed in a future release
WARNING: Use of the three-letter time zone ID "ECT" is deprecated and it will be removed in a future release

Context & Root Cause

  1. Exact 28 IDs:
    These 28 IDs map 1:1 to the keys in java.time.ZoneId.SHORT_IDS (the legacy JDK 1.1 timezone compatibility table).
  2. OpenJDK 25 Change:
    In JDK 25, OpenJDK introduced an explicit stderr warning in java.util.TimeZone.getTimeZone(String ID):
    if (ZoneId.SHORT_IDS.containsKey(ID)) {
        System.err.printf(
            "WARNING: Use of the three-letter time zone ID \"%s\" is deprecated and it will be removed in a future release%n",
            ID);
    }
    
  3. Trigger:
    The warnings fire in a tight loop (~15–20 ms) when Lucee bootstraps and registers/caches available timezones during server startup. Our application and container environment are explicitly configured with standard IANA timezone identifiers (e.g., Australia/Brisbane), so the lookup is being triggered internally by Lucee rather than user code.

Proposed Resolution

Lucee’s datetime/timezone cache initialization could be modernized to:

  • Use java.time.ZoneId instead of java.util.TimeZone.getTimeZone(...) for resolving zone entries, or
  • Filter out legacy 3-letter IDs in ZoneId.SHORT_IDS when querying java.util.TimeZone to prevent stderr noise and prepare for when OpenJDK eventually removes them.

Thanks!

Thanks for the detailed write-up, you’re spot on. Lucee’s TimeZoneUtil resolves every ID from TimeZone.getAvailableIDs() at startup, and that includes the legacy three-letter ones, which is what triggers the new JDK 25 warning. The warnings are harmless, but we’ll change it so those IDs are only resolved when they’re actually used, which stops the noise at startup. Ticket: Jira

Related, from the application side: I recently moved my blog’s time zone handling from a stored GMT offset (-8) to full Java zone names like America/Los_Angeles, because the fixed offset was an hour off all summer. Using the full region names everywhere, rather than three-letter IDs or offsets, also keeps you clear of this deprecation. If it helps anyone, I wrote up what I changed for both Adobe ColdFusion and Lucee: My Blog’s Clock Was an Hour Slow All Summer

2 Likes