Esempio n. 1
0
        public virtual DateTime ToUniversalTime(DateTime time)
        {
            if (time.Kind == DateTimeKind.Utc)
            {
                return(time);
            }

            __DateTime x = time;

            return(new __DateTime
            {
                Kind = DateTimeKind.Utc,
                InternalValue = new IDate(x.InternalValue.getTime() - InternalGetOffset())
            });
        }
Esempio n. 2
0
        public virtual DateTime ToLocalTime(DateTime time)
        {
            if (time.Kind == DateTimeKind.Local)
            {
                return(time);
            }

            __DateTime x = time;

            return(new __DateTime
            {
                Kind = DateTimeKind.Local,
                InternalValue = new IDate(x.InternalValue.getTime() + InternalGetOffset())
            });
        }