You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2020/09/09 14:39:38 UTC

[lucene-solr] branch branch_8x updated: use seconds instead of millisecs

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

mikemccand pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 9213998  use seconds instead of millisecs
9213998 is described below

commit 92139985c3eeb80adb8af345e61a3090d30430a5
Author: Frank Zhu <fr...@hotmail.com>
AuthorDate: Wed Sep 9 16:57:16 2020 +1000

    use seconds instead of millisecs
    
    It's a minor mistake and it doesn't affect the output due to the scale change (It will just make PAST_HOUR, PAST_SIX_HOURS not as intended). Still it's better to be correct.
---
 .../demo/src/java/org/apache/lucene/demo/facet/RangeFacetsExample.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/demo/src/java/org/apache/lucene/demo/facet/RangeFacetsExample.java b/lucene/demo/src/java/org/apache/lucene/demo/facet/RangeFacetsExample.java
index 32a4071..85f8905 100644
--- a/lucene/demo/src/java/org/apache/lucene/demo/facet/RangeFacetsExample.java
+++ b/lucene/demo/src/java/org/apache/lucene/demo/facet/RangeFacetsExample.java
@@ -46,7 +46,7 @@ public class RangeFacetsExample implements Closeable {
 
   private final Directory indexDir = new RAMDirectory();
   private IndexSearcher searcher;
-  private final long nowSec = System.currentTimeMillis();
+  private final long nowSec = System.currentTimeMillis()/1000L;
 
   final LongRange PAST_HOUR = new LongRange("Past hour", nowSec-3600, true, nowSec, true);
   final LongRange PAST_SIX_HOURS = new LongRange("Past six hours", nowSec-6*3600, true, nowSec, true);