Phpcms V9 {date (' y-m-d ', $r [inputtime])} Problem resolution

Source: Internet
Author: User

Many friends will encounter this problem: in Phpcms V9 in the first page or the article content page call publish time {date (' y-m-d ', $r [inputtime])} Call display 1970-01-01, and then try to use truncation method also did not succeed, should do?

Some friends suggest "first convert to time format, intercept it", the specific code is "{str_cut ($inputtime, $dot =")} ", and some people say" {$updatetime} directly with this call is good ", but many friends still did not succeed!

Let me specify the actual reason for the downgrade to be unsuccessful, and how to solve it!

First, perhaps you are not properly called for the reason:

The code for the general invocation is this:

    1. There is no reason to call correctly!
    2. If you use {loop $data $k $v} call, then use {date (' y-m-d h:i:s ', $v [Inputtime])} to apply "V" to the application;
    3. If you use
    4. {Loop $data $r}, use {date (' y-m-d h:i:s ', $r [Inputtime])} to apply the "R" call.
    5. This is called on the list page, and if it is on the article page, it is also possible to use {$inputtime} directly.

This is my previous reply in the Forum, that is, you may have mixed in the middle of V and R.


Second, if there is no mixing, then it can be said to be a V9 problem, because I based on experience, sometimes did not modify the model, but also the call is unsuccessful.
If this is the case, try {$updatetime} or {str_cut ($inputtime, a, $dot = ')} The code is generally not successful.

Then you can try my own measurement out of the solution, before the Forum in reply to have said, this time to collate, and share with you:

1, modify the need to call this time model, backstage "content" on the left side of the "Management model" field management, find 17 "Publish Time" this item, and then click "Modify".

2, in "Time format" inside select "Integer display format"



In addition to the "As basic information" selected, that is, when publishing the article, this item is visible!

Phpcms V9 {date (' y-m-d ', $r [inputtime])} Problem resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.