Beispiel #1
0
        public static byte[] writeBinaryDate(DateTime obj)
        {
            List <byte> nums = new List <byte>(Plist.RegulateNullBytes(BitConverter.GetBytes(PlistDateConverter.ConvertToAppleTimeStamp(obj)), 8));

            nums.Reverse();
            nums.Insert(0, 51);
            Plist.objectTable.InsertRange(0, nums);
            return(nums.ToArray());
        }
Beispiel #2
0
 public static object parseBinaryDate(int headerPosition)
 {
     byte[] array = Plist.objectTable.GetRange(headerPosition + 1, 8).ToArray();
     Array.Reverse((Array)array);
     return(PlistDateConverter.ConvertFromAppleTimeStamp(BitConverter.ToDouble(array, 0)));
 }