List:Commits« Previous MessageNext Message »
From:Reggie Burnett Date:January 13 2012 5:54pm
Subject:bzr commit into connector-net-6.3 branch (reggie.burnett:1110) Bug#63812
Bug#13591554
View as plain text  
#At file:///C:/work/connector-net/6.3/ based on revid:fer.gonzalez@stripped

 1110 Reggie Burnett	2012-01-13
      - Return datetime values for timestamp fields as DateTimeKind.Local (MySQL bug #63812, Oracle bug #13591554)

    modified:
      CHANGES
      Source/MySql.Data/Types/MySqlDateTime.cs
=== modified file 'CHANGES'
=== modified file 'CHANGES'
--- a/CHANGES	2012-01-09 21:17:00 +0000
+++ b/CHANGES	2012-01-13 17:54:26 +0000
@@ -1,5 +1,5 @@
-
 - Made MySqlDateTime serializable (MySQL bug #40555, Oracle bug #11750161).
+- Return datetime values for timestamp fields as DateTimeKind.Local (MySQL bug #63812, Oracle bug #13591554)
 
 Version 6.3.8
 - Modified ProviderManifest.xml to map TIMESTAMP db fields to the DateTime .NET type (MySQL bug #55351, Oracle bug #12652602).

=== modified file 'Source/MySql.Data/Types/MySqlDateTime.cs'
--- a/Source/MySql.Data/Types/MySqlDateTime.cs	2012-01-09 21:17:00 +0000
+++ b/Source/MySql.Data/Types/MySqlDateTime.cs	2012-01-13 17:54:26 +0000
@@ -382,8 +382,10 @@
     {
       if (!IsValidDateTime)
         throw new MySqlConversionException("Unable to convert MySQL date/time value to System.DateTime");
-
-      return new DateTime(year, month, day, hour, minute, second);
+      DateTimeKind kind = DateTimeKind.Unspecified;
+      if (type == MySqlDbType.Timestamp)
+        kind = DateTimeKind.Local;
+      return new DateTime(year, month, day, hour, minute, second, kind);
     }
 
     private static string FormatDateCustom(string format, int monthVal, int dayVal, int yearVal)


Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20120113175426-lvaup2h05cld52fy.bundle
Thread
bzr commit into connector-net-6.3 branch (reggie.burnett:1110) Bug#63812Bug#13591554Reggie Burnett16 Jan