Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
PSDI Army
yii2
Commits
c8f9479a
Commit
c8f9479a
authored
Apr 24, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3236 from pgaultier/bugfix/dateNormalize
Bugfix/date normalize
parents
8c79c4f0
4727ecdb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
Formatter.php
framework/base/Formatter.php
+2
-2
No files found.
framework/CHANGELOG.md
View file @
c8f9479a
...
...
@@ -20,6 +20,7 @@ Yii Framework 2 Change Log
-
Bug #3194: Date formatter works only for timestamps in the year range 1970 to 2038 (kartik-v)
-
Bug #3204:
`yii\di\Container`
did not handle the
`$config`
parameter well in case when it does not have a default value (qiangxue)
-
Bug #3216: Fixed the bug that
`yii.activeForm.destroy()`
did not remove
`submit`
event handlers (qiangxue)
-
Bug #3236: Return value for DateTime->format('U') casted to double to allow correct date formatting (pgaultier)
-
Enh #2264:
`CookieCollection::has()`
will return false for expired or removed cookies (qiangxue)
-
Enh #2837: Error page now shows arguments in stack trace method calls (samdark)
-
Enh #3008: Added
`Html::errorSummary()`
(qiangxue)
...
...
framework/base/Formatter.php
View file @
c8f9479a
...
...
@@ -357,11 +357,11 @@ class Formatter extends Component
}
catch
(
\Exception
$e
)
{
return
false
;
}
$value
=
$date
->
format
(
'U'
);
$value
=
(
double
)
$date
->
format
(
'U'
);
}
return
$value
;
}
elseif
(
$value
instanceof
DateTime
||
$value
instanceof
\DateTimeInterface
)
{
return
$value
->
format
(
'U'
);
return
(
double
)
$value
->
format
(
'U'
);
}
else
{
return
(
double
)
$value
;
}
...
...
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