Php 如何在日期时间格式中包含秒?

Php 如何在日期时间格式中包含秒?,php,datetime,Php,Datetime,我正在开发一个投标系统,我想显示的日期和时间的所有投标人和秒是包括在格式中 我使用了这个LOCecho日期('m/d/Y H:I:s',strottime($w['postedDate')) 它会显示该06/17/2013 17:35:00,除秒外,该值是正确的。数据库中特定日期时间的秒数是.53而不是00 请从数据库中公布日期。“s”应该是正确的一个基本调试:var_dump($w['postedDate],strotime($w['postedDate'))。看起来$w['postedDat

我正在开发一个投标系统,我想显示的日期和时间的所有投标人和秒是包括在格式中

我使用了这个LOC
echo日期('m/d/Y H:I:s',strottime($w['postedDate'))


它会显示该
06/17/2013 17:35:00
,除秒外,该值是正确的。数据库中特定日期时间的秒数是.53而不是00

请从数据库中公布日期。“s”应该是正确的一个基本调试:
var_dump($w['postedDate],strotime($w['postedDate'))。看起来$w['postedDate']缺少秒,该变量的值是多少?我怀疑秒没有从
$w['postedDate']
正确解析。您提到秒为.53-点可能会使其解析为1/100秒。6/17/2013 5:35:53 PM-这是数据库字符串(19)“Jun 17 2013 5:35PM”int(1371515700)上变量的值-这是“var_dump($w['postedDate'),strotime($w['postedDate'));”有没有其他方法可以用来显示包含秒数的日期时间?