File tree 2 files changed +3
-16
lines changed
main/java/org/sqlite/date
2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -288,16 +288,15 @@ public Object parseObject(final String source) throws ParseException {
288
288
* @see org.apache.commons.lang3.time.DateParser#parse(java.lang.String)
289
289
*/
290
290
public Date parse (final String source ) throws ParseException {
291
- String normalizedSource = source .length () == 19 ? (source + ".000" ) : source ;
292
- final Date date = parse (normalizedSource , new ParsePosition (0 ));
291
+ final Date date = parse (source , new ParsePosition (0 ));
293
292
if (date ==null ) {
294
293
// Add a note re supported date range
295
294
if (locale .equals (JAPANESE_IMPERIAL )) {
296
295
throw new ParseException (
297
296
"(The " +locale + " locale does not support dates before 1868 AD)\n " +
298
- "Unparseable date: \" " +normalizedSource +"\" does not match " +parsePattern .pattern (), 0 );
297
+ "Unparseable date: \" " +source +"\" does not match " +parsePattern .pattern (), 0 );
299
298
}
300
- throw new ParseException ("Unparseable date: \" " +normalizedSource +"\" does not match " +parsePattern .pattern (), 0 );
299
+ throw new ParseException ("Unparseable date: \" " +source +"\" does not match " +parsePattern .pattern (), 0 );
301
300
}
302
301
return date ;
303
302
}
Original file line number Diff line number Diff line change @@ -421,18 +421,6 @@ public void dateTimeTest() throws SQLException {
421
421
Date d = rs .getDate (1 );
422
422
assertEquals (day .getTime (), d .getTime ());
423
423
}
424
-
425
- @ Test
426
- public void defaultDateTimeTest () throws SQLException {
427
- stat .executeUpdate ("create table daywithdefaultdatetime (id integer, datetime datatime default current_timestamp)" );
428
- PreparedStatement prep = conn .prepareStatement ("insert into daywithdefaultdatetime (id) values (1)" );
429
- prep .setInt (1 , 1 );
430
- prep .executeUpdate ();
431
- ResultSet rs = stat .executeQuery ("select * from day" );
432
- assertTrue (rs .next ());
433
- Date d = rs .getDate (2 );
434
- assertTrue (d != null );
435
- }
436
424
437
425
@ Test
438
426
public void maxRows () throws SQLException {
You can’t perform that action at this time.
0 commit comments