Commit d987cfe3 authored by Steve Müller's avatar Steve Müller

fix datetimetz type compatibility on SQL Anywhere versions < 12

parent 7c68e80f
...@@ -535,6 +535,14 @@ class SQLAnywherePlatform extends AbstractPlatform ...@@ -535,6 +535,14 @@ class SQLAnywherePlatform extends AbstractPlatform
return 'DATETIME'; return 'DATETIME';
} }
/**
* {@inheritdoc}
*/
public function getDateTimeTzFormatString()
{
return $this->getDateTimeFormatString();
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -592,6 +592,14 @@ class SQLAnywherePlatformTest extends AbstractPlatformTestCase ...@@ -592,6 +592,14 @@ class SQLAnywherePlatformTest extends AbstractPlatformTestCase
$this->_platform->getRegexpExpression(); $this->_platform->getRegexpExpression();
} }
public function testHasCorrectDateTimeTzFormatString()
{
// Date time type with timezone is not supported before version 12.
// For versions before we have to ensure that the date time with timezone format
// equals the normal date time format so that it corresponds to the declaration SQL equality (datetimetz -> datetime).
$this->assertEquals($this->_platform->getDateTimeFormatString(), $this->_platform->getDateTimeTzFormatString());
}
public function testHasCorrectDefaultTransactionIsolationLevel() public function testHasCorrectDefaultTransactionIsolationLevel()
{ {
$this->assertEquals( $this->assertEquals(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment