freastro commented on code in PR #2995:
URL: https://github.com/apache/calcite/pull/2995#discussion_r1040273603


##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -2006,15 +1997,11 @@ public static long toLong(Timestamp v) {
     return toLong(v, LOCAL_TZ);
   }
 
-  // mainly intended for java.sql.Timestamp but works for other dates also
-  @SuppressWarnings("JavaUtilDate")
-  public static long toLong(java.util.Date v, TimeZone timeZone) {
-    final long time = v.getTime();
-    return time + timeZone.getOffset(time);
+  public static long toLong(Timestamp v, TimeZone timeZone) {

Review Comment:
   I updated the javadoc on the method in `SqlFunctions` that I touched. Most 
of it is a copy & paste from the methods I added to `DateTimeUtils`, but I 
thought it would be useful to re-explain it here too.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to