Home  >  Q&A  >  body text

python - django 模板使用 `|date:"Y-m-d H:m"` 过滤器后所有的输出时间都变成一样了

{{ order.start_time|date:"Y-m-d H:m" }}

没有加 |date:* 时显示 March 21, 2017, 1:49 a.m.
加上后变成了 2017-03-21 01:03
而且不论 order.start_time 是什么值,用 |date:* 后都变成了同样的 2017-03-21 01:03

困惑,求解。

天蓬老师天蓬老师2741 days ago487

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 10:30:14

    m is the month, i is the minute

    reply
    0
  • Cancelreply