Skip to content

Commit

Permalink
timestamp bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
hiiru committed Sep 6, 2013
1 parent f387c9f commit 4cf9824
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SolrNet/Impl/FormatParser/JavaBin/JavaBinCodec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ public object ReadNode(FastInputStream dis, string name = "")
case DATE:
node.SolrType = SolrResponseDocumentNodeType.Date;
DateTime date;
try
{
date = utcDateTime.AddMilliseconds(dis.ReadLong()).ToLocalTime();
long timestamp = dis.ReadLong();
if (timestamp < -62135596800000)
timestamp = -62135596800000;
try {
date = utcDateTime.AddMilliseconds(timestamp).ToLocalTime();
}
catch
{
Expand Down

0 comments on commit 4cf9824

Please sign in to comment.