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()) }); }
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()) }); }