コード例 #1
0
        private void writeSceDateTime(Stream dst, SceDateTime time)
        {
            DataUtils.WriteUInt16(dst, time.Year);
            DataUtils.WriteUInt16(dst, time.Month);
            DataUtils.WriteUInt16(dst, time.Day);

            DataUtils.WriteUInt16(dst, time.Hour);
            DataUtils.WriteUInt16(dst, time.Minute);
            DataUtils.WriteUInt16(dst, time.Second);
            DataUtils.WriteUInt32(dst, time.Microsecond);
        }
コード例 #2
0
        private SceDateTime readDatetime()
        {
            SceDateTime dateTime = new SceDateTime();

            dateTime.Year        = readUInt16();
            dateTime.Month       = readUInt16();
            dateTime.Day         = readUInt16();
            dateTime.Hour        = readUInt16();
            dateTime.Minute      = readUInt16();
            dateTime.Second      = readUInt16();
            dateTime.Microsecond = readUInt32();
            return(dateTime);
        }
コード例 #3
0
        private SceDateTime dateTimeToSceDateTime(DateTime dt)
        {
            SceDateTime sdt = new SceDateTime();

            sdt.Day   = Convert.ToUInt16(dt.Day);
            sdt.Month = Convert.ToUInt16(dt.Month);
            sdt.Year  = Convert.ToUInt16(dt.Year);


            sdt.Hour        = Convert.ToUInt16(dt.Hour);
            sdt.Minute      = Convert.ToUInt16(dt.Minute);
            sdt.Second      = Convert.ToUInt16(dt.Second);
            sdt.Microsecond = Convert.ToUInt32(dt.Millisecond * 1000);
            return(sdt);
        }