HHH-16082 - Correction to the epoch extraction for DB2
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
parent
20c901ff91
commit
2019fca0cb
|
@ -1012,6 +1012,12 @@ public class DB2Dialect extends Dialect {
|
|||
return "dayofweek(?2)";
|
||||
case QUARTER:
|
||||
return "quarter(?2)";
|
||||
case EPOCH:
|
||||
if ( getDB2Version().isBefore( 11 ) ) {
|
||||
return timestampdiffPattern( TemporalUnit.SECOND, TemporalType.TIMESTAMP, TemporalType.TIMESTAMP )
|
||||
.replace( "?2", "'1970-01-01 00:00:00'" )
|
||||
.replace( "?3", "?2" );
|
||||
}
|
||||
}
|
||||
return super.extractPattern( unit );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue