lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r567885 - /incubator/lucene.net/trunk/C#/src/Test/Search/TestDateFilter.cs
Date Tue, 21 Aug 2007 00:38:51 GMT
Author: aroush
Date: Mon Aug 20 17:38:51 2007
New Revision: 567885

URL: http://svn.apache.org/viewvc?rev=567885&view=rev
Log:
Fix: LUCENENET-64 "TestDateFilter incorrectly gets total milliseconds"

Modified:
    incubator/lucene.net/trunk/C#/src/Test/Search/TestDateFilter.cs

Modified: incubator/lucene.net/trunk/C#/src/Test/Search/TestDateFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Search/TestDateFilter.cs?rev=567885&r1=567884&r2=567885&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Search/TestDateFilter.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Search/TestDateFilter.cs Mon Aug 20 17:38:51 2007
@@ -49,7 +49,7 @@
 			RAMDirectory indexStore = new RAMDirectory();
 			IndexWriter writer = new IndexWriter(indexStore, new SimpleAnalyzer(), true);
 			
-			long now = System.DateTime.Now.Millisecond;
+			long now = (long) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds;
 			
 			Lucene.Net.Documents.Document doc = new Lucene.Net.Documents.Document();
 			// add time that is in the past
@@ -106,7 +106,7 @@
 			RAMDirectory indexStore = new RAMDirectory();
 			IndexWriter writer = new IndexWriter(indexStore, new SimpleAnalyzer(), true);
 			
-			long now = System.DateTime.Now.Millisecond;
+			long now = (long) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds;
 			
 			Lucene.Net.Documents.Document doc = new Lucene.Net.Documents.Document();
 			// add time that is in the future



Mime
View raw message