LIBOMV-913: OSDDate does not properly serialize/deserialize

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3547 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
Latif Khalifa
2011-06-10 11:53:08 +00:00
parent 73c2a836c3
commit ab15645ace
2 changed files with 4 additions and 4 deletions

View File

@@ -283,7 +283,7 @@ namespace OpenMetaverse.StructuredData
osd = OSD.FromUri(uri);
break;
case dateBinaryMarker:
double timestamp = NetworkToHostDouble(ConsumeBytes(stream, doubleLength));
double timestamp = Utils.BytesToDouble(ConsumeBytes(stream, doubleLength), 0);
DateTime dateTime = DateTime.SpecifyKind(Utils.Epoch, DateTimeKind.Utc);
dateTime = dateTime.AddSeconds(timestamp);
osd = OSD.FromDate(dateTime.ToLocalTime());
@@ -444,7 +444,7 @@ namespace OpenMetaverse.StructuredData
int intHostEnd = System.Net.IPAddress.NetworkToHostOrder(intNetEnd);
return intHostEnd;
}
/// <summary>
///
/// </summary>
@@ -459,8 +459,8 @@ namespace OpenMetaverse.StructuredData
byte[] binaryHostEnd = BitConverter.GetBytes(longHostEnd);
double doubleHostEnd = BitConverter.ToDouble(binaryHostEnd, 0);
return doubleHostEnd;
}
/// <summary>
///
/// </summary>