Seems like the display of renewal dates is messed up. I have dates stored as unix timestamps in the database and when presented in views I now see they are incorrect. They are pretty close to what you'd expect though, so I haven't noticed this for a while.
For example, in a view displaying the data stored in a custom field for a custom post type, We see "April 14, 2018". However, the database says 1564718400. Punching that into epochconverter.com, I get "Friday, August 2, 2019", which also matches our source of data outside of the system.
So it seems things are correct data-wise but WordPress is translating the seconds since epoch value of "1564718400" to "April 14, 2018" for some reason.
Please advise on how we can investigate this issue.
This is on a live, business site with users already, so if there's anyway to expedite this that would be great. I can setup access to the site for your investigation, etc.
Hi, sounds like either a caching issue or a targeting issue. Can you try these troubleshooting steps first?
- Temporarily disable any site caching systems or caching plugins
- Turn caching off for the View in question. You can do this by adding a parameter to the View's shortcode:
[wpv-view name="Your View Name" cached="off"]
- Verify that the custom field is targeted correctly. Just before your custom field shortcode, insert the post title shortcode. If you do not want it to be visible on the live site, use a hidden span like this:
<span style="display:none;">[wpv-post-title]</span>[types field="your-date-field-slug"][/types]
Then you can inspect the source of the page to see if the custom field value is targeting the correct post (you should see the name of the post that includes the date custom field). If not, then it's probably just a matter of adding the correct post information in the Types field shortcode.
Please let me know the results of these tests and we can go from there.
Hello Christian,
We do not use caching and I know the correct data is being targeted, as changes in the date in the wordpress front end is reflected in the view properly.
I apologize, I was submitting this on behalf of another tech person here, and they totally we're looking at the wrong posts when they were comparing the backend to frontend.
You can close this ticket, I apologize for wasting your time!
Sure, I will mark this one resolved. Thanks!