if (!canUseCurrentTimeAsDefaultForTime())
{
return;
}
CurrentTimeTablePeer.doDelete(new Criteria());
CurrentTimeTable currentTime = new CurrentTimeTable();
Date currentDateBefore = doSelect("CURRENT_TIME", Time.class);
currentTime.save();
Date currentDateAfter = doSelect("CURRENT_TIME", Time.class);
List<CurrentTimeTable> dbStateList
= CurrentTimeTablePeer.doSelect(new Criteria());
assertEquals(1, dbStateList.size());
CurrentTimeTable dbState = dbStateList.get(0);
if (timezoneBuggyInCurrentTime())
{
return;
}
assertFalse(
"currentDate should be >= currentDateBefore",
dbState.getCurrentTimeValue().before(currentDateBefore));
assertFalse(
"currentDate should be <= currentDateAfter",
dbState.getCurrentTimeValue().after(currentDateAfter));
}