public void TestNullableDatesAndTimes ()
		{
			DateTime dt = new DateTime (2012, 1, 3, 10, 0, 0, 0);
			
			var d = new NullableDatesAndTimes () {
				MyTime = dt,
				MyTimeNullable = dt,
				MyDate = dt,
				MyDateNullable = dt
			};
			
			XmlSerializer ser = new XmlSerializer (d.GetType ());
			StringWriter sw = new StringWriter ();
			ser.Serialize (sw, d);
			string str = sw.ToString ();

			Assert.IsTrue (str.IndexOf ("<MyTime>10:00:00</MyTime>") != -1, "Time");
			Assert.IsTrue (str.IndexOf ("<MyTimeNullable>10:00:00</MyTimeNullable>") != -1, "Nullable Time");
			Assert.IsTrue (str.IndexOf ("<MyDate>2012-01-03</MyDate>") != -1, "Date");
			Assert.IsTrue (str.IndexOf ("<MyDateNullable>2012-01-03</MyDateNullable>") != -1, "Nullable Datwe");
		}
		public void TestNullableDatesAndTimes ()
		{
			DateTime dt = new DateTime (2012, 1, 3, 10, 0, 0, 0, DateTimeKind.Utc);
			
			var d = new NullableDatesAndTimes () {
				MyTime = dt,
				MyTimeNullable = dt,
				MyDate = dt,
				MyDateNullable = dt
			};
			
			XmlSerializer ser = new XmlSerializer (d.GetType ());
			StringWriter sw = new StringWriter ();
			ser.Serialize (sw, d);
			string str = sw.ToString ();

			var expected =
"<?xml version=\"1.0\" encoding=\"utf-16\"?>" + Environment.NewLine +
"<root xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" + Environment.NewLine +
"  <MyTime>10:00:00.0000000Z</MyTime>" + Environment.NewLine +
"  <MyTimeNullable>10:00:00.0000000Z</MyTimeNullable>" + Environment.NewLine +
"  <MyDate>2012-01-03</MyDate>" + Environment.NewLine +
"  <MyDateNullable>2012-01-03</MyDateNullable>" + Environment.NewLine +
"</root>";

			Assert.AreEqual (expected, str);
		}