Skip Navigation

[Resolved] View with date filter

This support ticket is created 9 years, 2 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
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 3 replies, has 2 voices.

Last updated by Adriano 9 years, 2 months ago.

Assisted by: Adriano.

Author
Posts
#247887

Hi,

I have created a view with a filter by date
wpcf-fecha-y-hora BETWEEN TODAY(), FUTURE_DAY(1)

it must display the events I've defined that happens today with the types field "fecha-y-hora". It works perfect except for a detail, It doesn't respect the UTC I have defined in the WordPress general settings: UTC-4 hours and at 8pm it understand that we are in the next day.

How can I correct it?

Thanks in advance

#248472

That's a expected behaviour, because our functions uses system's date by adodb_date(). So there is no way to use the UTC defined in WordPress settings for now.

#249927

Finally I solved it. I added in functions.php this code:

date_default_timezone_set(get_option('timezone_string'));
#250047

Nice! Thank you for sharing the solution with us.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.