소스 검색

Update recipe_file_uploads.rst

xorg-robur 11 년 전
부모
커밋
635a30f27e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Resources/doc/cookbook/recipe_file_uploads.rst

+ 1 - 1
Resources/doc/cookbook/recipe_file_uploads.rst

@@ -136,7 +136,7 @@ We then have the following methods in our ``Image`` class to manage file uploads
      * Updates the hash value to force the preUpdate and postUpdate events to fire
      */
     public function refreshUpdated() {
-        $this->setUpdated(date('Y-m-d H:i:s'));
+        $this->setUpdated(new \DateTime("now"));
     }
 
     // ... the rest of your class lives under here, including the generated fields