@@ -1123,24 +1123,6 @@ internal static bool ToPrimitive(BorrowedReference value, Type obType, out objec
11231123 var minute = Runtime . PyObject_GetAttrString ( value , minutePtr ) ;
11241124 var second = Runtime . PyObject_GetAttrString ( value , secondPtr ) ;
11251125 var microsecond = Runtime . PyObject_GetAttrString ( value , microsecondPtr ) ;
1126- var timeKind = DateTimeKind . Unspecified ;
1127- var tzinfo = Runtime . PyObject_GetAttrString ( value , tzinfoPtr ) ;
1128-
1129- NewReference hours = default ;
1130- NewReference minutes = default ;
1131- if ( ! tzinfo . IsNone ( ) && ! tzinfo . IsNull ( ) )
1132- {
1133- var tznameMethod = Runtime . PyObject_GetAttrString ( tzinfo . Borrow ( ) , new StrPtr ( "tzname" , Encoding . UTF8 ) ) ;
1134- var args = Runtime . PyTuple_New ( 1 ) ;
1135- Runtime . PyTuple_SetItem ( args . Borrow ( ) , 0 , Runtime . None . Steal ( ) ) ;
1136- var tznameObj = Runtime . PyObject_CallObject ( tznameMethod . Borrow ( ) , args . Borrow ( ) ) ;
1137- var tzname = Runtime . GetManagedString ( tznameObj . Borrow ( ) ) ;
1138-
1139- if ( tzname . Contains ( "UTC" , StringComparison . InvariantCultureIgnoreCase ) )
1140- {
1141- timeKind = DateTimeKind . Utc ;
1142- }
1143- }
11441126
11451127 var convertedHour = 0L ;
11461128 var convertedMinute = 0L ;
@@ -1161,8 +1143,7 @@ internal static bool ToPrimitive(BorrowedReference value, Type obType, out objec
11611143 ( int ) convertedHour ,
11621144 ( int ) convertedMinute ,
11631145 ( int ) convertedSecond ,
1164- millisecond : ( int ) milliseconds ,
1165- timeKind ) ;
1146+ ( int ) milliseconds ) ;
11661147
11671148 year . Dispose ( ) ;
11681149 month . Dispose ( ) ;
@@ -1172,16 +1153,6 @@ internal static bool ToPrimitive(BorrowedReference value, Type obType, out objec
11721153 second . Dispose ( ) ;
11731154 microsecond . Dispose ( ) ;
11741155
1175- if ( ! tzinfo . IsNull ( ) )
1176- {
1177- tzinfo . Dispose ( ) ;
1178- if ( ! tzinfo . IsNone ( ) )
1179- {
1180- hours . Dispose ( ) ;
1181- minutes . Dispose ( ) ;
1182- }
1183- }
1184-
11851156 Exceptions . Clear ( ) ;
11861157 return true ;
11871158 default :
0 commit comments