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

liujun pushed a commit to branch dev-metadata
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git

commit 9bd95634a003804c6b241960977a128a85901fb0
Author: ken.lj <[email protected]>
AuthorDate: Wed Oct 17 19:13:32 2018 +0800

    Add test scope pom dependency
---
 .../org/apache/dubbo/servicedata/integration/ServiceStoreService.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/dubbo-servicedata/dubbo-servicedata-api/src/main/java/org/apache/dubbo/servicedata/integration/ServiceStoreService.java
 
b/dubbo-servicedata/dubbo-servicedata-api/src/main/java/org/apache/dubbo/servicedata/integration/ServiceStoreService.java
index d487423..cc1d22a 100644
--- 
a/dubbo-servicedata/dubbo-servicedata-api/src/main/java/org/apache/dubbo/servicedata/integration/ServiceStoreService.java
+++ 
b/dubbo-servicedata/dubbo-servicedata-api/src/main/java/org/apache/dubbo/servicedata/integration/ServiceStoreService.java
@@ -32,6 +32,7 @@ import 
org.apache.dubbo.servicedata.metadata.builder.ServiceDescriptorBuilder;
 import org.apache.dubbo.servicedata.store.ServiceStore;
 import org.apache.dubbo.servicedata.store.ServiceStoreFactory;
 
+import java.util.Calendar;
 import java.util.Date;
 import java.util.Random;
 import java.util.Set;
@@ -126,8 +127,7 @@ public class ServiceStoreService {
     long calculateStartTime() {
         Date now = new Date();
         long nowMill = now.getTime();
-        // FIXME
-        long today0 = 0;
+        long today0 = DateUtils.truncate(now, Calendar.DAY_OF_MONTH).getTime();
         long subtract = today0 + ONE_DAY_IN_MIll - nowMill;
         Random r = new Random();
         return subtract + (FOUR_HOURS_IN_MIll / 2) + 
r.nextInt(FOUR_HOURS_IN_MIll);

Reply via email to