lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [19/20] lucenenet git commit: Lucene.Net.QueryParser.Flexible.Standard.Cofig.NumberDateFormat: Fixed potential bug with parsing number without specifying culture by changing it to invariant culture
Date Tue, 28 Feb 2017 12:30:10 GMT
Lucene.Net.QueryParser.Flexible.Standard.Cofig.NumberDateFormat: Fixed potential bug with parsing
number without specifying culture by changing it to invariant culture


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/4e105bc9
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/4e105bc9
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/4e105bc9

Branch: refs/heads/api-work
Commit: 4e105bc9c126b377badb21aaf5676725fcae8e7b
Parents: 1d1ff89
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Tue Feb 28 18:49:44 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Tue Feb 28 18:49:44 2017 +0700

----------------------------------------------------------------------
 .../Flexible/Standard/Config/NumberDateFormat.cs                   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4e105bc9/src/Lucene.Net.QueryParser/Flexible/Standard/Config/NumberDateFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Config/NumberDateFormat.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Config/NumberDateFormat.cs
index 940950d..1a856cf 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Standard/Config/NumberDateFormat.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Config/NumberDateFormat.cs
@@ -96,7 +96,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard.Config
 
         public override string Format(object number)
         {
-            return new DateTime(EPOCH).AddMilliseconds(Convert.ToInt64(number)).ToString(GetDateFormat(),
this.locale);
+            return new DateTime(EPOCH).AddMilliseconds(Convert.ToInt64(number, CultureInfo.InvariantCulture)).ToString(GetDateFormat(),
this.locale);
         }
 
         /// <summary>


Mime
View raw message