You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/02/28 12:30:10 UTC
[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
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 <sh...@shadstorhaug.com>
Authored: Tue Feb 28 18:49:44 2017 +0700
Committer: Shad Storhaug <sh...@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>