Kimono.KTimeZone.ToZoneTime C# (CSharp) Method

ToZoneTime() public method

Converts a UTC date/time into local time in this time zone. Because of daylight savings time shifts, some local date/time values occur twice. The secondOccurrence parameter may be used to determine whether the time returned is the first or second occurrence of that time. name="utcDateTime" UTC date/time. An error occurs if utcDateTime.timeSpec() is not Qt.UTC. name="secondOccurrence" if non-null, returns true if the return value is the second occurrence of that time, else false
public ToZoneTime ( QDateTime utcDateTime, bool &secondOccurrence ) : QDateTime
utcDateTime QDateTime
secondOccurrence bool
return QDateTime
        public QDateTime ToZoneTime(QDateTime utcDateTime, ref bool secondOccurrence)
        {
            StackItem[] stack = new StackItem[3];
            #if DEBUG
            stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(utcDateTime);
            #else
            stack[1].s_class = (IntPtr) GCHandle.Alloc(utcDateTime);
            #endif
            stack[2].s_bool = secondOccurrence;
            interceptor.Invoke("toZoneTime#$", "toZoneTime(const QDateTime&, bool*) const", stack);
            #if DEBUG
            DebugGCHandle.Free((GCHandle) stack[1].s_class);
            #else
            ((GCHandle) stack[1].s_class).Free();
            #endif
            secondOccurrence = stack[2].s_bool;
            object returnValue = ((GCHandle) stack[0].s_class).Target;
            #if DEBUG
            DebugGCHandle.Free((GCHandle) stack[0].s_class);
            #else
            ((GCHandle) stack[0].s_class).Free();
            #endif
            return (QDateTime) returnValue;
        }

Same methods

KTimeZone::ToZoneTime ( QDateTime utcDateTime ) : QDateTime