Skip Navigation

[Resolved] Use Multiple Data Picker On Same Page And Fill Data Through 3rd Party Api

This support ticket is created 2 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 3 voices.

Last updated by Luo Yang 2 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#2325805

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

#2325825

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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).

#2326151

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.

#2326657

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