{"record":{"id":"1311556fe02c3000","repo":"prestodb/presto","slug":"specified-timezoneid-is-not-supported","errorCode":null,"errorMessage":"Specified timeZoneId is not supported: ","messagePattern":"Specified timeZoneId is not supported: ","errorType":"validation","errorClass":"SQLException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java","lineNumber":181,"sourceCode":"            throws SQLException\n    {\n        return APPLICATION_NAME_PREFIX.getValue(properties);\n    }\n\n    public Properties getProperties()\n    {\n        return properties;\n    }\n\n    public String getTimeZoneId()\n            throws SQLException\n    {\n        Optional<String> timezone = TIMEZONE_ID.getValue(properties);\n\n        if (timezone.isPresent()) {\n            List<String> timeZoneIds = Arrays.asList(TimeZone.getAvailableIDs());\n            if (!timeZoneIds.contains(timezone.get())) {\n                throw new SQLException(\"Specified timeZoneId is not supported: \" + timezone.get());\n            }\n            return timezone.get();\n        }\n        return TimeZone.getDefault().getID();\n    }\n\n    public Map<String, String> getExtraCredentials()\n            throws SQLException\n    {\n        return EXTRA_CREDENTIALS.getValue(properties).orElse(ImmutableMap.of());\n    }\n\n    public Map<String, String> getCustomHeaders()\n            throws SQLException\n    {\n        return CUSTOM_HEADERS.getValue(properties).orElse(ImmutableMap.of());\n    }\n","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java#L163-L199","documentation":"getTimeZoneId() validates the 'timeZoneId' connection property against TimeZone.getAvailableIDs() and throws SQLException('Specified timeZoneId is not supported: ...') when the supplied value is not a recognized JVM time zone ID. The value must be a valid Java TimeZone identifier; it is used to interpret TIMESTAMP values in the session.","triggerScenarios":"Passing a connection property timeZoneId with a misspelled or non-IANA id (e.g. 'UTC+2', 'utc', 'GMT+05:30' variants not in getAvailableIDs, or empty/garbage strings) while connecting via PrestoDriver.","commonSituations":"Config typos in JDBC URLs (jdbc:presto://...?timeZoneId=...), using offsets like '+02:00' instead of zone ids, moving between JVMs with different tz databases, Docker images missing tzdata.","solutions":["Set timeZoneId to a canonical Java TimeZone id, e.g. 'UTC', 'America/Los_Angeles', 'Asia/Kolkata'","Verify the id with TimeZone.getTimeZone(value) and check it is not normalized to 'GMT' (a sign the id is invalid)","If no timezone is needed, omit the property — the driver defaults to TimeZone.getDefault().getID()","Install/refresh tzdata for the JVM if a legitimate zone id is reported missing (TZ updater / OS tzdata package)"],"exampleFix":"// before\nString url = \"jdbc:presto://host:8080/hive/default?timeZoneId=utc+2\"; // invalid\n// after\nString url = \"jdbc:presto://host:8080/hive/default?timeZoneId=Europe/Paris\"; // valid Java zone id","handlingStrategy":"validation","validationCode":"String tz = properties.getProperty(\"timeZoneId\");\nif (tz != null && java.util.Arrays.asList(java.util.TimeZone.getAvailableIDs()).noneMatch(tz::equals)) {\n    throw new IllegalArgumentException(\"Invalid timeZoneId: \" + tz);\n}","typeGuard":null,"tryCatchPattern":"try { conn = DriverManager.getConnection(url, props); } catch (SQLException e) { if (e.getMessage().startsWith(\"Specified timeZoneId is not supported\")) { fixTimeZoneProperty(props); conn = DriverManager.getConnection(url, props); } else { throw e; } }","preventionTips":["Use canonical Java TimeZone ids (e.g. UTC, America/New_York) not UTC offsets","Validate timeZoneId with TimeZone.getTimeZone and check it doesn't normalize to GMT","Omit the property to use the JVM default","Keep tzdata current in containers/JVMs"],"tags":["jdbc","timezone","configuration","connection"],"backgroundTag":"invalid-timezone-id","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}