private void WriteBinaryDate(DateTime obj) { var buffer = new List <byte>(RegulateNullBytes(BitConverter.GetBytes(PlistDateConverter.ConvertToAppleTimeStamp(obj)), 8)); buffer.Reverse(); buffer.Insert(0, 0x33); _objectTable.InsertRange(0, buffer); }
private object ParseBinaryDate(int headerPosition) { byte[] buffer = _objectTable.GetRange(headerPosition + 1, 8).ToArray(); Array.Reverse(buffer); double appleTime = BitConverter.ToDouble(buffer, 0); DateTime result = PlistDateConverter.ConvertFromAppleTimeStamp(appleTime); return(result); }