[ 
https://issues.apache.org/jira/browse/TINKERPOP-3212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035189#comment-18035189
 ] 

ASF GitHub Bot commented on TINKERPOP-3212:
-------------------------------------------

andreachild commented on code in PR #3267:
URL: https://github.com/apache/tinkerpop/pull/3267#discussion_r2488317021


##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/DateDiffStep.java:
##########
@@ -95,7 +95,7 @@ protected Long map(final Traverser.Admin<S> traverser) {
         }
 
         // let's not throw exception and assume null date == 0
-        return otherDate == null ? date.toEpochSecond() : 
Duration.between(otherDate, date).getSeconds();
+        return otherDate == null ? date.toEpochSecond() : 
Duration.between(otherDate, date).toMillis();

Review Comment:
   Yes! Thanks for catching. I've fixed it to return milliseconds.





> Date step consistency
> ---------------------
>
>                 Key: TINKERPOP-3212
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3212
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.8.0
>            Reporter: Andrea Child
>            Priority: Major
>              Labels: breaking
>             Fix For: 3.8.0
>
>
> Dev list post: 
> [https://lists.apache.org/thread/okomr6xqgbsk4y0t76xpn7gjx9t26d0c]
> It would be nice to be able to ‘round trip’ the asNumber(), asDate(), and 
> dateDiff() steps. Currently these steps cannot be used in combination with 
> each other because asNumber() does not handle dates, asDate() expects 
> milliseconds, and dateDiff() returns seconds.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to