Ver Fonte

Timestamp type causes incorrect dates to be set.

If you use @ODM\Timestamp as the type for Timestampable fields,
the dates get stored incorrectly in MongoDB. Using Date for both
created and updated fixes the issue.

Phil Moorhouse há 13 anos atrás
pai
commit
87b3b3bf2c
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      doc/timestampable.md

+ 2 - 2
doc/timestampable.md

@@ -165,9 +165,9 @@ class Article
     private $title;
     private $title;
 
 
     /**
     /**
-     * @var timestamp $created
+     * @var date $created
      *
      *
-     * @ODM\Timestamp
+     * @ODM\Date
      * @Gedmo\Timestampable(on="create")
      * @Gedmo\Timestampable(on="create")
      */
      */
     private $created;
     private $created;