You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by ti...@apache.org on 2022/01/17 16:53:56 UTC

[rocketmq] branch develop updated: variable "timestamp" should be -1 when the timestamp parameter is set to "now"

This is an automated email from the ASF dual-hosted git repository.

tigerlee pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 1fd7833  variable "timestamp" should be -1 when the timestamp parameter is set to "now"
     new a62b70b  Merge pull request #1077 from ssssssnake/issue-resetOffsetByTime
1fd7833 is described below

commit 1fd78338be7bd3bb527e1671324deb9fb78ef73b
Author: ssssssnake <15...@qq.com>
AuthorDate: Tue Mar 12 14:22:36 2019 +0800

    variable "timestamp" should be -1 when the timestamp parameter is set to "now"
---
 .../apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java b/tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java
index 3f2bc1b..266de75 100644
--- a/tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java
+++ b/tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java
@@ -75,7 +75,7 @@ public class ResetOffsetByTimeCommand implements SubCommand {
             String group = commandLine.getOptionValue("g").trim();
             String topic = commandLine.getOptionValue("t").trim();
             String timeStampStr = commandLine.getOptionValue("s").trim();
-            long timestamp = timeStampStr.equals("now") ? System.currentTimeMillis() : 0;
+            long timestamp = timeStampStr.equals("now") ? -1 : 0;
 
             try {
                 if (timestamp == 0) {