Saltar navegación

[Resuelto] Form datepicker output consistent with WordPress time zone

This support ticket is created 2 years, 8 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Zona horaria del colaborador: Asia/Kolkata (GMT+05:30)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Minesh 2 years, 8 months ago.

Asistido por: Minesh.

Autor
Mensajes
#2651405

Tell us what you are trying to do?
My form includes a date time field to report time of observation. The datepicker is not respecting the time zone selected in WordPress. When I select a date/time, the result appears to be UTC+0. Is there any way to set the CRED datepicker time-zone?

Is there any documentation that you are following?
I have examined many threads on the jQuery UI datepicker but have not found anything that solves my problem.

Is there a similar example that we can see?
I find that datepickers generally get configured to output a date/time, or at least show the user a date/time, that is consistent with their regional settings / time zone.

What is the link to your site?
enlace oculto

#2651499

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

What if you try to use the function shared by Nigel with the following reference ticket:
- https://toolset.com/forums/topic/universal-time-for-toolset-date-field-in-wordpress-admin/page/2/#post-2639189

You can use the function to convert your selected date timestamp and pass your desired timezone to covert to and save the return value to the database. You can update the custom date field value based on the funtions's return value using the "cred_save_data" hook.
- https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

Please let me know if you will require further assistance for that.