Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
47c259fe
Commit
47c259fe
authored
Jul 29, 2015
by
Valentinas Bartusevičius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Field column length now fixed. Added documentation.
parent
2502d17c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
types.rst
docs/en/reference/types.rst
+9
-0
DateIntervalType.php
lib/Doctrine/DBAL/Types/DateIntervalType.php
+3
-0
No files found.
docs/en/reference/types.rst
View file @
47c259fe
...
...
@@ -289,6 +289,15 @@ without date, time and timezone information, you should consider using this type
Values retrieved from the database are always converted to PHP's ``\DateTime`` object
or ``null`` if no data is present.
dateinterval
^^^^^^^^^^^^
Maps and converts date and time difference data without timezone information.
If you know that the data to be stored is the difference between two date and time values,
you should consider using this type.
Values retrieved from the database are always converted to PHP's ``\DateInterval`` object
or ``null`` if no data is present.
.. note::
See the `Known Vendor Issue <./known-vendor-issues>`_ section
...
...
lib/Doctrine/DBAL/Types/DateIntervalType.php
View file @
47c259fe
...
...
@@ -22,6 +22,9 @@ class DateIntervalType extends Type
*/
public
function
getSQLDeclaration
(
array
$fieldDeclaration
,
AbstractPlatform
$platform
)
{
$fieldDeclaration
[
'length'
]
=
20
;
$fieldDeclaration
[
'fixed'
]
=
true
;
return
$platform
->
getVarcharTypeDeclarationSQL
(
$fieldDeclaration
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment