<action dev="jahlborn" type="update">
Enabled expression evaluation by default.
</action>
+ <action dev="jahlborn" type="update">
+ Change the default DateTimeType to LOCAL_DATE_TIME.
+ </action>
</release>
<release version="3.0.1" date="2019-04-13">
<action dev="jahlborn" type="update">
/**
* Returns the default DateTimeType. This defaults to
- * {@link DateTimeType#DATE}, but can be overridden using the system
+ * {@link DateTimeType#LOCAL_DATE_TIME}, but can be overridden using the system
* property {@value com.healthmarketscience.jackcess.Database#DATE_TIME_TYPE_PROPERTY}.
* @usage _advanced_method_
*/
public static DateTimeType getDefaultDateTimeType() {
return getEnumSystemProperty(DateTimeType.class, DATE_TIME_TYPE_PROPERTY,
- DateTimeType.DATE);
+ DateTimeType.LOCAL_DATE_TIME);
}
/**
{
for(final TestDB testDB : TestDB.getSupportedForBasename(Basename.COMPLEX)) {
Database db = openCopy(testDB);
+ db.setDateTimeType(DateTimeType.DATE);
db.setTimeZone(TEST_TZ);
Table t1 = db.getTable("Table1");
public void testGetNextRow() throws Exception {
for (final TestDB testDB : SUPPORTED_DBS_TEST_FOR_READ) {
final Database db = open(testDB);
+ db.setDateTimeType(DateTimeType.DATE);
+
assertEquals(4, db.getTableNames().size());
final Table table = db.getTable("Table1");
public void testWriteAndReadDate() throws Exception {
for (final FileFormat fileFormat : SUPPORTED_FILEFORMATS) {
Database db = createMem(fileFormat);
+ db.setDateTimeType(DateTimeType.DATE);
Table table = new TableBuilder("test")
.addColumn(new ColumnBuilder("name", DataType.TEXT))
for (final FileFormat fileFormat : SUPPORTED_FILEFORMATS) {
Database db = createMem(fileFormat);
+ db.setDateTimeType(DateTimeType.DATE);
db.setTimeZone(tz);
Table table = new TableBuilder("test")
for (final TestDB testDB : TestDB.getSupportedForBasename(Basename.OLD_DATES)) {
Database db = openCopy(testDB);
+ db.setDateTimeType(DateTimeType.DATE);
Table t = db.getTable("Table1");
public void testUniqueEntryCount() throws Exception {
for (final TestDB testDB : SUPPORTED_DBS_TEST) {
Database db = openCopy(testDB);
+ db.setDateTimeType(DateTimeType.DATE);
Table table = db.getTable("Table1");
IndexImpl indA = (IndexImpl)table.getIndex("PrimaryKey");
IndexImpl indB = (IndexImpl)table.getIndex("B");
import com.healthmarketscience.jackcess.CursorBuilder;
import com.healthmarketscience.jackcess.DataType;
import com.healthmarketscience.jackcess.Database;
+import com.healthmarketscience.jackcess.DateTimeType;
import com.healthmarketscience.jackcess.Index;
import com.healthmarketscience.jackcess.Row;
import com.healthmarketscience.jackcess.Table;
{
for (final TestDB testDB : TestDB.getSupportedForBasename(Basename.INDEX_CODES, true)) {
Database db = openMem(testDB);
+ db.setDateTimeType(DateTimeType.DATE);
for(Table t : db) {
for(Index index : t.getIndexes()) {
import com.healthmarketscience.jackcess.ColumnBuilder;
import com.healthmarketscience.jackcess.DataType;
import com.healthmarketscience.jackcess.Database;
+import com.healthmarketscience.jackcess.DateTimeType;
import com.healthmarketscience.jackcess.Table;
import com.healthmarketscience.jackcess.TableBuilder;
import com.healthmarketscience.jackcess.impl.JetFormatTest;
for (final FileFormat fileFormat : JetFormatTest.SUPPORTED_FILEFORMATS) {
Database db = create(fileFormat);
+ db.setDateTimeType(DateTimeType.DATE);
db.setTimeZone(TEST_TZ);
Table t = new TableBuilder("test")