private static String applyTimestampFormat(String arg, String format, TimeZone timeZone) {
    return DruidExpressions.functionCall("timestamp_format",
        ImmutableList.of(arg, DruidExpressions.stringLiteral(format), DruidExpressions.stringLiteral(timeZone.getID()))
    );
  }
utility function to extract timezone id from Druid query
@param query Druid Rel
@return time zone
ql/src/java/org/apache/hadoop/hive/ql/parse/DruidSqlOperatorConverter.java