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/09/22 05:55:27 UTC
[04/11] lucenenet git commit: BUG:
Lucene.Net.Tests.QueryParser.Flexible.Precedence.TestPrecedenceQueryParser:
Fixed test to always use GregorianCalendar and local time zone.
BUG: Lucene.Net.Tests.QueryParser.Flexible.Precedence.TestPrecedenceQueryParser: Fixed test to always use GregorianCalendar and local time zone.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/fe8add7a
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/fe8add7a
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/fe8add7a
Branch: refs/heads/master
Commit: fe8add7a54948f5ee168ce840b9277003b39246b
Parents: 713a645
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Sep 19 21:50:40 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Sep 22 03:06:03 2017 +0700
----------------------------------------------------------------------
.../Flexible/Precedence/TestPrecedenceQueryParser.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fe8add7a/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
index 8a7e3eb..d2a936e 100644
--- a/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
@@ -450,9 +450,9 @@ namespace Lucene.Net.QueryParsers.Flexible.Precedence
//}
//return df.format(calendar.getTime());
-
- var calendar = CultureInfo.CurrentCulture.Calendar;
+ var calendar = new GregorianCalendar(GregorianCalendarTypes.Localized);
DateTime lastDate = calendar.ToDateTime(year, month, day, 0, 0, 0, 0);
+ lastDate = TimeZoneInfo.ConvertTime(lastDate, TimeZoneInfo.Local);
if (extendLastDate)
{