@@ -273,28 +273,28 @@ def assert_obj_set_and_save(attribute, value)
273
273
col . sql_type . must_equal 'date'
274
274
col . type . must_equal :date
275
275
col . null . must_equal true
276
- col . default . must_equal connection_dblib_73? ? Date . civil ( 0001 , 1 , 1 ) : '0001-01-01'
277
- obj . date . must_equal Date . civil ( 0001 , 1 , 1 )
276
+ col . default . must_equal Date . civil ( 1900 , 1 , 1 )
277
+ obj . date . must_equal Date . civil ( 1900 , 1 , 1 )
278
278
col . default_function . must_be_nil
279
279
type = connection . lookup_cast_type_from_column ( col )
280
280
type . must_be_instance_of Type ::Date
281
281
type . limit . must_be_nil
282
282
type . precision . must_be_nil
283
283
type . scale . must_be_nil
284
284
# Can cast strings. SQL Server format.
285
- obj . date = '04-01-0001 '
286
- obj . date . must_equal Date . civil ( 0001 , 4 , 1 )
285
+ obj . date = '04-01-1900 '
286
+ obj . date . must_equal Date . civil ( 1900 , 4 , 1 )
287
287
obj . save!
288
- obj . date . must_equal Date . civil ( 0001 , 4 , 1 )
288
+ obj . date . must_equal Date . civil ( 1900 , 4 , 1 )
289
289
obj . reload
290
- obj . date . must_equal Date . civil ( 0001 , 4 , 1 )
290
+ obj . date . must_equal Date . civil ( 1900 , 4 , 1 )
291
291
# Can cast strings. ISO format.
292
- obj . date = '0001 -04-01'
293
- obj . date . must_equal Date . civil ( 0001 , 4 , 1 )
292
+ obj . date = '1900 -04-01'
293
+ obj . date . must_equal Date . civil ( 1900 , 4 , 1 )
294
294
obj . save!
295
- obj . date . must_equal Date . civil ( 0001 , 4 , 1 )
295
+ obj . date . must_equal Date . civil ( 1900 , 4 , 1 )
296
296
obj . reload
297
- obj . date . must_equal Date . civil ( 0001 , 4 , 1 )
297
+ obj . date . must_equal Date . civil ( 1900 , 4 , 1 )
298
298
# Can keep and return assigned date.
299
299
assert_obj_set_and_save :date , Date . civil ( 1972 , 04 , 14 )
300
300
# Can accept and cast time objects.
0 commit comments