guptanikhil007 commented on a change in pull request #2409: URL: https://github.com/apache/hive/pull/2409#discussion_r657244719
########## File path: ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateFormat.java ########## @@ -85,21 +87,31 @@ public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumen String fmtStr = getConstantStringValue(arguments, 1); if (fmtStr != null) { try { - formatter = new SimpleDateFormat(fmtStr); - formatter.setCalendar(DateTimeMath.getTimeZonedProlepticGregorianCalendar()); + if (timeZone == null) { + timeZone = SessionState.get() == null ? new HiveConf().getLocalTimeZone() : SessionState.get().getConf() Review comment: done -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org