File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public Task ReadWriteNormalAsync()
32
32
{
33
33
try
34
34
{
35
- var expected = DateTime . Today . Date ;
35
+ var expected = DateTime . Today ;
36
36
37
37
return ReadWriteAsync ( expected ) ;
38
38
}
@@ -77,6 +77,7 @@ public Task ReadWriteYear750Async()
77
77
78
78
private async Task ReadWriteAsync ( DateTime expected , CancellationToken cancellationToken = default ( CancellationToken ) )
79
79
{
80
+ // Add an hour to check it is correctly ignored once read back from db.
80
81
var basic = new DateClass { DateValue = expected . AddHours ( 1 ) } ;
81
82
object savedId ;
82
83
using ( var s = OpenSession ( ) )
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public void ShouldBeDateType()
54
54
[ Test ]
55
55
public void ReadWriteNormal ( )
56
56
{
57
- var expected = DateTime . Today . Date ;
57
+ var expected = DateTime . Today ;
58
58
59
59
ReadWrite ( expected ) ;
60
60
}
@@ -80,6 +80,7 @@ public void ReadWriteYear750()
80
80
81
81
private void ReadWrite ( DateTime expected )
82
82
{
83
+ // Add an hour to check it is correctly ignored once read back from db.
83
84
var basic = new DateClass { DateValue = expected . AddHours ( 1 ) } ;
84
85
object savedId ;
85
86
using ( var s = OpenSession ( ) )
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ public interface IDriver
160
160
bool HasDelayedDistributedTransactionCompletion { get ; }
161
161
162
162
/// <summary>
163
- /// The minimal date supported by this driver.
163
+ /// The minimal date supplied as a <see cref="DateTime" /> supported by this driver.
164
164
/// </summary>
165
165
DateTime MinDate { get ; }
166
166
}
Original file line number Diff line number Diff line change @@ -90,5 +90,10 @@ public override bool SupportsMultipleQueries
90
90
}
91
91
92
92
public override bool RequiresTimeSpanForTime => true ;
93
+
94
+ // As of v5.7, lower dates may "work" but without guarantees.
95
+ // https://dev.mysql.com/doc/refman/5.7/en/datetime.html
96
+ /// <inheritdoc />
97
+ public override DateTime MinDate => new DateTime ( 1000 , 1 , 1 ) ;
93
98
}
94
99
}
You can’t perform that action at this time.
0 commit comments