Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CauanCabral/d90459b8818f8bd62953 to your computer and use it in GitHub Desktop.
Save CauanCabral/d90459b8818f8bd62953 to your computer and use it in GitHub Desktop.
CakePHP 3 Problem with localized date
object(App\Model\Entity\Article) {
'new' => true,
'accessible' => [
[maximum depth reached]
],
'properties' => [
[maximum depth reached]
],
'dirty' => [
[maximum depth reached]
],
'original' => [[maximum depth reached]],
'virtual' => [[maximum depth reached]],
'errors' => [[maximum depth reached]],
'repository' => 'Articles'
}
[
'title' => 'ljlkjlkj',
'date' => '14/11/2014 15:36:01',
'content' => '<p>lkjlkj</p>',
'created' => object(Cake\I18n\Time) {},
'modified' => object(Cake\I18n\Time) {},
'professional_id' => (int) 1
]
Error: SQLSTATE[22008]: Datetime field overflow: 7 ERROR: date/time field value out of range: "14/11/2014 15:36:01" HINT: Perhaps you need a different "datestyle" setting.
If you are using SQL keywords as table column names, you can enable identifier quoting for your database connection in config/app.php.
SQL Query: INSERT INTO articles (title, date, content, created, modified, professional_id) VALUES (:c0, :c1, :c2, :c3, :c4, :c5) RETURNING *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment