I am trying to: We created custom post and meta fields and use posts to autofill data through 3rd ClassIn API. Except datepicker all works fine. We update start and end dates using api but Toolset auto update timestamp to 12 hour format.
For example we use 01-01-2022 14:56 as a start time and 02-01-2022 1:59 as end time. Start date it works but when end date timestamp insert in database both start and end date update into 12 hour format.
Link to a page where the issue can be seen: hidden link
I expected to see: it should work perfect
Instead, I got: Error as I've explained above,
Let me know if you need anymore help. Connect me on skype - alfred.wayne99 or call me +91 8740094000
Hi there
You know that Types date fields are stored as UNIX timestamps, yes? And you are updating the relevant entry in wp_postmeta with a timestamp (not a formatted date as in your examples above)?
Unless you specify a format, if you output a Types date field (e.g. using a types shortcode) then it just uses the default WordPress format from your settings (at Settings > General).
Just I gave you an example but we're stored the data in Unix timestamp after that we're getting same issues. The issue is which the exact data we're filling through 3rd party in timestamp is in end date.
I've shared server access. Please see.
3rd party is Amelia plugin.
Hello,
How do you setup the timestamp value of custom date field "end time"?
For example, if the date is 02-01-2022 1:59, then the timestamp value should be: 1643680740
You can get the timestamp value with PHP function strtotime(), see PHP document:
hidden link