@@ -62,11 +62,11 @@ protected function autoWriteData(array &$data, bool $update)
6262 */
6363 protected function autoDateTime (array &$ data , bool $ update )
6464 {
65- $ autoDateTime = $ this ->getOption ('auto_timestamp ' , true );
65+ $ autoDateTime = $ this ->getOption ('autoWriteTimestamp ' , true );
6666 if ($ autoDateTime ) {
67- $ dateTimeFields = [$ this ->getOption ('update_time ' )];
67+ $ dateTimeFields = [$ this ->getOption ('updateTime ' )];
6868 if (!$ update ) {
69- array_unshift ($ dateTimeFields , $ this ->getOption ('create_time ' ));
69+ array_unshift ($ dateTimeFields , $ this ->getOption ('createTime ' ));
7070 }
7171
7272 foreach ($ dateTimeFields as $ field ) {
@@ -121,12 +121,12 @@ public function getDateFormat()
121121
122122 public function setDateFormat (string $ format )
123123 {
124- $ this ->setOption ('datetime_format ' , $ format );
124+ $ this ->setOption ('dateFormat ' , $ format );
125125 }
126126
127127 public function setTimeField ($ createTime , $ updateTime )
128128 {
129- $ this ->setOption ('create_time ' , $ createTime );
130- $ this ->setOption ('update_time ' , $ updateTime );
129+ $ this ->setOption ('createTime ' , $ createTime );
130+ $ this ->setOption ('updateTime ' , $ updateTime );
131131 }
132132}
0 commit comments