PHP-随着PHP和CSCART的TPL的改变时间
在我的cscart
应用程序中,我使用 .tpl Template文件来涂抹一些输入数据。
在应用程序设置中,有一种默认格式显示它,例如'%h:%m'
,我不想更改。我想在一个视图中强制它来查看秒。
但是,由于我对CSCART和.TPL文件非常新,这是行:
{$log.timestamp|date_format:"`$settings.Appearance.date_format`, `$settings.Appearance.time_format`"}
11/04/2022,21.38
我希望使用秒显示。 =“ https://currentmillis.com/” rel =“ nofollow noreferrer”> https://currentmillis.com/
尝试用:date('h:i:i:i:: s');
,但没有成功。
有人可以帮忙吗,做到这一点的正确方法是什么?
In my CScart
application I use .tpl template file to dipslay some input data.
In the application settings, there is a default format for displaying it like '%H:%M'
which I do not want to change. I want to force it just in one view to view seconds.
But as I am pretty new with CScart and .tpl files, this is line:
{$log.timestamp|date_format:"`$settings.Appearance.date_format`, `$settings.Appearance.time_format`"}
Which is displaying: 11/04/2022, 21.38
I want it to be displayed with seconds.. Reference: https://currentmillis.com/
Tried of replacing second part of the code with: date('h:i:s');
, but no success.
Can someone help, what is the proper way of doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不是100%确定的,但是似乎这实际上是在使用PHP date_format 显示时间。我会用“ h:i:s”之类的东西替换“
$ settings.appearance.pearce.time_format
”。你为什么不尝试这条线,看看会发生什么
I'm not 100% sure, but it seems like this is actually using php date_format to display the time. I would, replace "
$settings.Appearance.time_format
" with something like "H:i:s".Why don't you try this line, and see what happens
请尝试:
Please try: