Browse Source

2009-03-18 Atsushi Enomoto <[email protected]>

	* XmlReader.cs : handle DateTimeOffset in typed reader methods.


svn path=/trunk/mcs/; revision=129672
Atsushi Eno 17 years ago
parent
commit
87dcaba14c

+ 4 - 0
mcs/class/System.XML/System.Xml/ChangeLog

@@ -1,3 +1,7 @@
+2009-03-18  Atsushi Enomoto  <[email protected]>
+
+	* XmlReader.cs : handle DateTimeOffset in typed reader methods.
+
 2009-03-17  Atsushi Enomoto  <[email protected]>
 
 	* XmlTextWriter2.cs : some weird TextWriter has null Encoding.

+ 2 - 0
mcs/class/System.XML/System.Xml/XmlReader.cs

@@ -993,6 +993,8 @@ namespace System.Xml
 					else
 						return XmlQualifiedName.Parse (text, this);
 				}
+				if (type == typeof (DateTimeOffset))
+					return XmlConvert.ToDateTimeOffset (text);
 
 				switch (Type.GetTypeCode (type)) {
 				case TypeCode.Boolean: