public virtual object fromutc(datetime dt) { timedelta dtOffset = utcoffset(dt); if (dtOffset == null) throw PythonOps.ValueError("fromutc: non-None utcoffset() result required"); timedelta dtDst = dst(dt); if (dtDst == null) throw PythonOps.ValueError("fromutc: non-None dst() result required"); timedelta delta = dtOffset - dtDst; dt = dt + delta; // convert to standard LOCAL time dtDst = dt.dst(); return dt + dtDst; }