lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r436776 - /incubator/lucene.net/tags/Lucene.Net_1_9_RC1_final/src/Lucene.Net/Document/DateField.cs
Date Fri, 25 Aug 2006 12:18:02 GMT
Author: aroush
Date: Fri Aug 25 05:18:01 2006
New Revision: 436776

URL: http://svn.apache.org/viewvc?rev=436776&view=rev
Log:
Fixed Lucene.Net.Documents.DateField.StringToDate()

Modified:
    incubator/lucene.net/tags/Lucene.Net_1_9_RC1_final/src/Lucene.Net/Document/DateField.cs

Modified: incubator/lucene.net/tags/Lucene.Net_1_9_RC1_final/src/Lucene.Net/Document/DateField.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/tags/Lucene.Net_1_9_RC1_final/src/Lucene.Net/Document/DateField.cs?rev=436776&r1=436775&r2=436776&view=diff
==============================================================================
--- incubator/lucene.net/tags/Lucene.Net_1_9_RC1_final/src/Lucene.Net/Document/DateField.cs
(original)
+++ incubator/lucene.net/tags/Lucene.Net_1_9_RC1_final/src/Lucene.Net/Document/DateField.cs
Fri Aug 25 05:18:01 2006
@@ -108,20 +108,15 @@
 		{
 			return SupportClass.Number.Parse(s, SupportClass.Number.MAX_RADIX);
 		}
+
 		/// <summary>Converts a string-encoded date into a Date object. </summary>
 		public static System.DateTime StringToDate(System.String s)
 		{
-            return new System.DateTime(StringToTime(s));
-
-            // {{Aroush-1.9}} Will the line above do it or do we need the lines below?!
-
-            /*
-            long ticks = StringToTime(s) * TimeSpan.TicksPerMillisecond;
-            System.DateTime date = new System.DateTime(1970, 1, 1);
-            date = date.AddTicks(ticks);
-            date = date.Add(TimeZone.CurrentTimeZone.GetUtcOffset(date));
-            return date;
-            */
+			long ticks = StringToTime(s) * TimeSpan.TicksPerMillisecond;
+			System.DateTime date = new System.DateTime(1970, 1, 1);
+			date = date.AddTicks(ticks);
+			date = date.Add(TimeZone.CurrentTimeZone.GetUtcOffset(date));
+			return date;
 		}
 	}
 }



Mime
View raw message