Commit ea5ac958 authored by Marco Pivetta's avatar Marco Pivetta

Merge pull request #560 from deeky666/fix-sqlanywhere-datetimetz-format

Fix DateTimeTz type compatibility on SQL Anywhere versions < 12
parents 6a120fb9 d987cfe3
...@@ -503,6 +503,14 @@ class SQLAnywherePlatform extends AbstractPlatform ...@@ -503,6 +503,14 @@ class SQLAnywherePlatform extends AbstractPlatform
return 'DATETIME'; return 'DATETIME';
} }
/**
* {@inheritdoc}
*/
public function getDateTimeTzFormatString()
{
return $this->getDateTimeFormatString();
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -603,6 +603,14 @@ class SQLAnywherePlatformTest extends AbstractPlatformTestCase ...@@ -603,6 +603,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