Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个数据库列schema.yml,它的“ timestamp”-ed。我根据模型生成一个表单:echo $form['deadline']->renderRow();
schema.yml
timestamp
echo $form['deadline']->renderRow();
但它只呈现:月/日/年小时/分钟- “秒”时间组件在哪里?
sfWidgetFormTime有一个选项with_seconds,它默认为 false,因此您必须将其设置为 true。您可以在表单类的配置方法中执行此操作,如下所示:
sfWidgetFormTime
with_seconds
$this->getWidget('deadline')->setOption('time', array('with_seconds' => true));