Exemplo n.º 1
0
        public static 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);
        }
Exemplo n.º 2
0
        public static byte[] writeBinaryDate(DateTime obj)
        {
            List <byte> buffer = new List <byte>(RegulateNullBytes(BitConverter.GetBytes(PlistDateConverter.ConvertToAppleTimeStamp(obj)), 8));

            buffer.Reverse();
            buffer.Insert(0, 0x33);
            objectTable.InsertRange(0, buffer);
            return(buffer.ToArray());
        }