Beispiel #1
0
        public static object parseBinaryDate(int headerPosition)
        {
            byte[] buffer = objectTable.GetRange(headerPosition + 1, 8).ToArray();
            System.Array.Reverse(buffer);
            double appleTime = System.BitConverter.ToDouble(buffer, 0);

            System.DateTime result = PlistDateConverter.ConvertFromAppleTimeStamp(appleTime);
            return(result);
        }
Beispiel #2
0
        public static byte[] writeBinaryDate(System.DateTime obj)
        {
            List <byte> buffer = new List <byte>(RegulateNullBytes(System.BitConverter.GetBytes(PlistDateConverter.ConvertToAppleTimeStamp(obj)), 8));

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