You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/05/20 22:48:52 UTC

[GitHub] [hive] achennagiri commented on a change in pull request #2217: HIVE:25054 Upgrade `jodd-core` dependency to get rid of CVE-2018-21234

achennagiri commented on a change in pull request #2217:
URL: https://github.com/apache/hive/pull/2217#discussion_r636524834



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/parquet/timestamp/NanoTimeUtils.java
##########
@@ -79,9 +79,10 @@ public static NanoTime getNanoTime(Timestamp ts, boolean skipConversion, ZoneId
     if (calendar.get(Calendar.ERA) == GregorianCalendar.BC) {
       year = 1 - year;
     }
-    JDateTime jDateTime = new JDateTime(year,
+    JulianDate jDateTime;
+    jDateTime = JulianDate.of(year,
         calendar.get(Calendar.MONTH) + 1,  //java calendar index starting at 1.
-        calendar.get(Calendar.DAY_OF_MONTH));
+        calendar.get(Calendar.DAY_OF_MONTH), 0, 0, 0, 0);

Review comment:
       This constructor call is not present in the newer code but we do the same essentially. We are setting the time to midnight(00:00:00:00) https://github.com/oblac/jodd/blob/v3.6.x/jodd-core/src/main/java/jodd/datetime/JDateTime.java#L895




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org